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
- 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
- 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 |
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.debounceMs |
150 |
Debounce interval (0-2000ms) |
fileChangeFollower.highlightDuration |
2000 |
How long to highlight changes (0 to disable) |
Example Settings
{
"fileChangeFollower.enabled": false,
"fileChangeFollower.includePatterns": ["src/**/*", "*.md"],
"fileChangeFollower.excludePatterns": [
"**/node_modules/**",
"**/.git/**",
"**/out/**"
],
"fileChangeFollower.debounceMs": 150,
"fileChangeFollower.highlightDuration": 2000
}
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.