Enhances VS Code terminal with useful features: command shortcuts, CD/Run/Stop/Clear/Restart buttons, and a terminal launcher. UI elements are placed in the terminal toolbar, side bar, and status bar.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
"Useful Terminal" dramatically streamlines your VS Code terminal operations, providing instant access to essential commands and utility functions.
Key Features
1. Command Shortcuts
Register your frequently used commands in a dedicated panel on the side bar and execute them with a single click.
Automatically launches the terminal and runs the command.
Customizable display names for each shortcut.
2. Terminal Toolbar Utilities
Adds 5 essential utility buttons directly to the terminal's top toolbar:
CD: Instantly change directory to the folder of the currently active editor file.
Run: Executes the currently active file by sending its absolute path to the terminal.
Stop: Sends SIGINT (Ctrl+C) to stop the current process.
Clear: Quickly clears all terminal logs.
Restart: Disposes of the current terminal and creates a fresh one instantly.
3. Smart Interoperability
When you open or create a terminal, the Shortcuts panel automatically focuses. Once you set up your layout, you can work seamlessly with both side-by-side.
4. Quick Launch Button
When no terminal is active, a highly visible "Launch Terminal" button appears in the status bar (bottom left).
Recommended Layout
To maximize the benefits of this extension, we recommend dragging the Shortcuts panel and splitting the view next to or below your terminal.
Click the terminal icon in the Side Bar (or Activity Bar).
Click and drag the "Shortcuts" title towards the terminal panel area.
Drop it to create a split view for simultaneous access.