File Change Follower
A VS Code extension that follows file changes in real-time, automatically opening editors and scrolling to edits as they happen. Perfect for watching CLI-based coding agents work.
Features
- Real-time file following: Automatically opens and scrolls to files as they're edited
- Change highlighting: Briefly highlights the lines that changed
- Recording & Playback: Record file change sessions and play them back later
- Timeline Panel: Visual timeline for navigating recordings
- Live Delay Mode: Buffer live events with configurable delay
- Status bar integration: See at a glance if follow mode is active, click to toggle
- Command palette: Quick access to enable, disable, or toggle follow mode
- Configurable patterns: Include or exclude files based on glob patterns
- Gitignore support: Automatically respects
.gitignore patterns
- Debounced updates: Prevents overwhelming the editor during rapid changes
Use Cases
- Watching coding agents: See exactly what GitHub Copilot CLI, aider, or other AI coding assistants are doing in real-time
- Pair programming: Follow along with changes made by a colleague
- Build watching: Monitor files as they're generated by build tools
- Log tailing: Watch log files update in real-time
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "File Change Follower"
- Click Install
From VSIX
- Download the
.vsix file from Releases
- In VS Code, open the Command Palette (Ctrl+Shift+P)
- Run "Extensions: Install from VSIX..."
- Select the downloaded file
Usage
Toggle Follow Mode
- Status Bar: Click the eye icon in the status bar
- Command Palette: Run "File Change Follower: Toggle Follow Mode" (Ctrl+Shift+P)
Commands
| Command |
Description |
File Change Follower: Toggle Follow Mode |
Toggle follow mode on/off |
File Change Follower: Enable Follow Mode |
Enable follow mode |
File Change Follower: Disable Follow Mode |
Disable follow mode |
File Change Follower: Start Recording Session |
Start recording file changes |
File Change Follower: Stop Recording and Save |
Stop recording and save to file |
File Change Follower: Open Recording File |
Open a recording file (.fcfr) |
File Change Follower: Play Recording |
Start playback of a recording |
File Change Follower: Pause Playback |
Pause the current playback |
File Change Follower: Stop Playback |
Stop playback completely |
File Change Follower: Skip to Next Event |
Jump to the next event in recording |
File Change Follower: Skip to Previous Event |
Jump to the previous event |
File Change Follower: Increase Playback Speed |
Speed up playback (up to 4x) |
File Change Follower: Decrease Playback Speed |
Slow down playback (down to 0.25x) |
File Change Follower: Toggle Live Delay Mode |
Toggle buffered live event mode |
File Change Follower: Catch Up to Live |
Jump to real-time in live delay mode |
File Change Follower: Show Timeline Panel |
Open the visual timeline panel |
Status Bar
The status bar shows the current state:
- 👁️ Following - Follow mode is active (highlighted background)
- 👁️🗨️ Not Following - Follow mode is inactive
Click the status bar item to toggle the mode.
Configuration
Configure the extension in VS Code settings:
| Setting |
Default |
Description |
fileChangeFollower.enabled |
false |
Enable follow mode on startup |
fileChangeFollower.includePatterns |
["**/*"] |
Glob patterns for files to include |
fileChangeFollower.excludePatterns |
["**/node_modules/**", "**/.git/**", ...] |
Glob patterns for files to exclude |
fileChangeFollower.respectGitignore |
true |
Ignore files listed in .gitignore |
fileChangeFollower.debounceMs |
150 |
Debounce interval (0-2000ms) |
fileChangeFollower.highlightDuration |
2000 |
How long to highlight changes (0 to disable) |
fileChangeFollower.recordingsPath |
".recordings" |
Directory for saved recordings |
fileChangeFollower.liveDelaySeconds |
0 |
Delay for live delay mode (0 = disabled) |
fileChangeFollower.defaultPlaybackSpeed |
1 |
Default playback speed multiplier |
Example Settings
{
"fileChangeFollower.enabled": false,
"fileChangeFollower.includePatterns": ["src/**/*", "*.md"],
"fileChangeFollower.excludePatterns": [
"**/node_modules/**",
"**/.git/**",
"**/out/**"
],
"fileChangeFollower.debounceMs": 150,
"fileChangeFollower.highlightDuration": 2000,
"fileChangeFollower.recordingsPath": ".recordings",
"fileChangeFollower.liveDelaySeconds": 5,
"fileChangeFollower.defaultPlaybackSpeed": 1
}
Recording & Playback
The extension supports recording file change sessions and playing them back later.
Recording
- Run "Start Recording Session" to begin capturing file changes
- Make changes to files in your workspace (or let a coding agent do it)
- Run "Stop Recording and Save" to save the recording
Recordings are saved as .fcfr files (JSON Lines format) in the configured recordingsPath directory.
Playback
- Run "Open Recording File" to load a
.fcfr file
- Run "Play Recording" to start playback
- Use speed controls (0.25x to 4x) to adjust playback speed
- Use skip commands to navigate between events
- Open the Timeline Panel for visual navigation
Live Delay Mode
Live delay mode buffers incoming file changes, allowing you to watch events with a configurable delay. This is useful when you want to follow along at your own pace while an agent is actively working.
- Set
liveDelaySeconds to a value greater than 0 (e.g., 5 seconds)
- Run "Toggle Live Delay Mode" to enable
- Run "Catch Up to Live" to jump to real-time when needed
How It Works
When follow mode is enabled:
- File watching: The extension monitors the workspace for file changes using VS Code's built-in file watcher
- Text document changes: When an open document is edited, the extension captures the changed ranges
- Debouncing: Rapid changes are debounced to prevent overwhelming the editor
- Display: The most recently changed file is opened (without stealing focus from your terminal) and scrolled to show the changes
- Highlighting: Changed lines are briefly highlighted using the diff editor colors
Requirements
Known Issues
- Very large files may experience slight delays when scrolling to changes
- Binary files are ignored
Contributing
Contributions are welcome! Please see the GitHub repository for more information.
License
MIT - see LICENSE for details.