-
Notifications
You must be signed in to change notification settings - Fork 39k
Feature request: "Kill Other Terminals" button in terminal pane #295740
Copy link
Copy link
Open
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityterminal-tabs
Milestone
Description
Currently, in the editor, right-clicking on a tab offers a "Close Others" option which closes all open editors except the active one. I would like a similar functionality for the terminal pane. Specifically, please add a "Kill Other Terminals" button (placed next to the existing "Kill Terminal" button) that, when used, closes all terminals except the one currently in focus.
This would help users quickly clear out unused or cluttered terminals while keeping their active session intact, improving workflow efficiency and consistency with the editor's UX.
How to implement (Key Code References by Copilot)
Terminal Actions and Kill Functionality
src/vs/workbench/contrib/terminal/browser/terminalActions.ts- Contains the core killInstance function and terminal action registrations including:TerminalCommandId.Kill- Kill active terminalTerminalCommandId.KillAll- Kill all terminalsTerminalCommandId.KillActiveTab- Kill selected terminal tab
Menu Configuration
src/vs/workbench/contrib/terminal/browser/terminalMenus.ts- Defines where terminal commands appear in context menus and view titles (e.g., MenuId.TerminalTabContext, MenuId.TerminalInstanceContext)
UI Components
src/vs/workbench/contrib/terminal/browser/terminalTabsList.ts- Renders terminal tabs with action bars, including the kill button
Icons
src/vs/workbench/contrib/terminal/browser/terminalIcons.ts- Defines killTerminalIcon using Codicon.trash
Editor "Close Others" Reference
For comparison with how the editor implements "Close Others":
src/vs/workbench/browser/parts/editor/editorActions.ts- Contains CloseEditorsInOtherGroupsActionsrc/vs/workbench/browser/parts/editor/editor.contribution.ts- Shows CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID menu registration
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityterminal-tabs