CleanX
A VS Code extension that provides a convenient button to close all Git diff editors (Working Tree and Index editors) from the Open Editors panel.
Features
- One-click cleanup: Adds a button to the Open Editors panel to close all Git diff editors at once
- Smart detection: Automatically identifies Working Tree and Index editors using multiple detection methods
- Status bar indicator: Shows the count of open Git diff editors in the status bar (optional)
- Configurable notifications: Choose whether to show notifications with how many editors closed (default: off)
How to Use
- Install the extension
- Look for the close button (X icon) in the Open Editors panel title bar
- Click the button to close all diff editors
- Configure settings as needed in VS Code settings
Extension Settings
This extension contributes the following settings:
cleanx.showNotifications : Show notification messages when closing Git diff editors (default: false )
cleanx.confirmBeforeClosing : Show confirmation dialog before closing Git diff editors (default: false )
Commands
cleanx.closeGitDiffEditors : Close all Git diff editors (can be accessed via Command Palette)
What Gets Closed
The extension intelligently identifies and closes:
- Working Tree diff editors
- Index diff editors
- Git diff editors from various SCM providers
- Editors with Git-related URI schemes (
git: , vscode-scm: , etc.)
- Editors with Git-related labels (containing "Working Tree", "Index", diff symbols)
Getting Started
- Clone this repository
- Run
pnpm install
- Press F5 to launch extension development host
Contributing
Pull requests are welcome!
| |