A lightweight VS Code extension that displays all currently opened files in a sidebar and lets you quickly switch between them using keyboard shortcuts.
Features
- View all opened files in a dedicated Explorer panel.
- Automatically updates when files are opened, closed, or switched.
- Open files directly from the sidebar.
- Navigate to files using keyboard shortcuts.
- Open any file by its index.
Preview
The explorer displays:
- filename.ts
- app.tsx
- package.json
- README.md
Selecting an item immediately opens the corresponding file.
Installation
From VSIX
- Open VS Code.
- Press
Ctrl + Shift + P. - Select Extensions: Install from VSIX...
- Choose the generated
.vsixfile.
Development Mode
npm install
npm run compile
Press:
F5
to launch a new Extension Development Host.
Commands
| Command | Description |
|---|---|
| Open File 1 | Open first file in the list |
| Open File 2 | Open second file in the list |
| Open File 3 | Open third file in the list |
| Open File 4 | Open fourth file in the list |
| Open File 5 | Open fifth file in the list |
| Open File 6 | Open sixth file in the list |
| Open File 7 | Open seventh file in the list |
| Open File 8 | Open eighth file in the list |
| Open File 9 | Open ninth file in the list |
| Open By Index | Open any file by entering its index |
Keyboard Shortcuts
Default shortcuts:
| Shortcut | Action |
|---|---|
| Alt + 1 | Open File 1 |
| Alt + 2 | Open File 2 |
| Alt + 3 | Open File 3 |
| Alt + 4 | Open File 4 |
| Alt + 5 | Open File 5 |
| Alt + 6 | Open File 6 |
| Alt + 7 | Open File 7 |
| Alt + 8 | Open File 8 |
| Alt + 9 | Open File 9 |
Shortcuts can be customized through VS Code Keyboard Shortcuts settings.
Explorer View
The extension adds a new sidebar section:
Open Files
├── 1. app.ts
├── 2. user.service.ts
├── 3. package.json
└── 4. README.md
Clicking an item opens the corresponding file.
How It Works
The extension uses the VS Code Tabs API:
- Reads all open tabs from all tab groups.
- Generates an indexed list.
- Displays the list in a Tree View.
- Refreshes automatically when tabs change.
- Opens files through the built-in
vscode.opencommand.
Requirements
- VS Code 1.125.0 or later
Development
Clone the repository:
git clone <repository-url>
cd open-files-explorer
Install dependencies:
npm install
Compile:
npm run compile
Watch mode:
npm run watch
Package extension:
npm install -g @vscode/vsce
vsce package
Known Limitations
- Non-text tabs may not be opened through keyboard commands.
- Only files currently opened in VS Code are displayed.
- File indices may change when tabs are reordered.
Contributing
Contributions, feature requests, and bug reports are welcome.
License
MIT License