Terminal Auto-reopen for VS Code
Never lose your terminal workflow again! This extension automatically reopens a terminal when the last one is closed in VS Code.
Features
🔄 Auto-reopen
- Automatically reopens a new terminal when the last one is closed
- Configurable enable/disable toggle
- Status bar indicator showing number of open terminals
📊 Status Bar Integration
- Shows current number of open terminals
- Visual warning indicator when no terminals are open
- Displays terminal count and state
Installation
- Open VS Code
- Press
Ctrl+P
(Cmd+P
on macOS)
- Type
ext install terminal-auto-reopen
- Press Enter
Usage
Basic Usage
The extension works automatically once installed. When you close your last terminal, a new one will be opened automatically.
Status Bar
The status bar shows:
- Number of open terminals (📟 2)
- Warning indicator when no terminals are open
- Terminal count updates in real-time
Commands
Access these commands through the Command Palette (Ctrl+Shift+P
or Cmd+Shift+P
):
Terminal Auto-reopen: Toggle
- Enable/disable automatic reopening
Keyboard Shortcuts
You can assign keyboard shortcuts to the toggle command in VS Code's Keyboard Shortcuts editor.
Example keybindings.json entry:
{
"key": "ctrl+k ctrl+t",
"command": "terminalReopen.toggle"
}
Configuration
Access settings through VS Code's Settings UI or settings.json:
{
"terminalReopen.enabled": true // Enable/disable auto-reopen
}
Development
Prerequisites
- Node.js and npm/yarn
- Visual Studio Code
- Recommended VS Code extensions:
- amodio.tsl-problem-matcher
- ms-vscode.extension-test-runner
- dbaeumer.vscode-eslint
Setup
- Clone the repository:
git clone https://github.com/riordanmb/terminal-auto-reopen.git
cd terminal-auto-reopen
- Install dependencies:
npm install
# or
yarn install
- Open in VS Code:
code .
Development Workflow
- Make changes to the source code in
src/
- Press
F5
to launch the extension in debug mode
- Use
npm run watch
or yarn watch
for automatic compilation
- Run tests using the Test Runner in VS Code
Building
npm run package
# or
yarn package
Testing
- Install the Extension Test Runner
- Run the watch task:
npm run watch-tests
# or
yarn watch-tests
- Open the Testing view and run tests
Publishing
- Update version in
package.json
- Update CHANGELOG.md
- Package the extension:
vsce package
- Publish to marketplace:
vsce publish
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT License
Release Notes
See CHANGELOG for detailed release notes.
0.0.4
- Initial release with basic functionality
- Auto-reopen of last terminal
- Status bar integration with terminal count
- Basic configuration option to enable/disable
Support
For bugs, feature requests, and questions, please create an issue.