Skip to content

Comments

Add command to open terminal in new window#258896

Merged
Tyriar merged 5 commits intomainfrom
copilot/fix-258895
Aug 4, 2025
Merged

Add command to open terminal in new window#258896
Tyriar merged 5 commits intomainfrom
copilot/fix-258895

Conversation

Copy link
Contributor

Copilot AI commented Jul 30, 2025

This PR adds a new VS Code command workbench.action.terminal.newInNewWindow that creates a new terminal directly in a new window, complementing the existing "Move Terminal into New Window" command that moves existing terminals.

What's new

Command: "New Terminal in New Window"

  • ID: workbench.action.terminal.newInNewWindow
  • Keyboard shortcut: Ctrl+Shift+Alt+`` (Windows/Linux), Cmd+Ctrl+Shift+Alt+`` (macOS)
  • Available in: Command Palette (F1)

Behavior

When executed, the command:

  1. Creates a new terminal instance
  2. Opens it directly in a new auxiliary window (separate from the main VS Code window)
  3. Automatically focuses the terminal for immediate use

Implementation details

The implementation follows established VS Code patterns:

  • Uses AUX_WINDOW_GROUP constant to open the terminal in a new window
  • Includes proper preconditions (TerminalContextKeys.processSupported or webExtensionContributedProfile)
  • Added to DEFAULT_COMMANDS_TO_SKIP_SHELL list for proper shell integration
  • Follows the same action registration pattern as other terminal creation commands

Files changed

  • src/vs/workbench/contrib/terminal/common/terminal.ts - Added command ID enum and skip shell entry
  • src/vs/workbench/contrib/terminal/common/terminalStrings.ts - Added localized string
  • src/vs/workbench/contrib/terminal/browser/terminalActions.ts - Implemented action with keybinding

Command comparison

  • "New Terminal": Creates terminal in current window
  • "Move Terminal into New Window": Moves existing terminal to new window
  • "New Terminal in New Window" ⭐: Creates NEW terminal directly in new window

This provides users with a more direct workflow for creating terminals in separate windows without having to first create a terminal and then move it.

Fixes #258895.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits July 30, 2025 21:40
Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com>
…tions

Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com>
Copilot AI changed the title [WIP] Add command to open terminal in new window Add command to open terminal in new window Jul 30, 2025
Copilot AI requested a review from Tyriar July 30, 2025 21:49
@Tyriar Tyriar added this to the August 2025 milestone Jul 31, 2025
@Tyriar Tyriar marked this pull request as ready for review August 3, 2025 13:02
@Tyriar Tyriar merged commit 78892ed into main Aug 4, 2025
18 checks passed
@Tyriar Tyriar deleted the copilot/fix-258895 branch August 4, 2025 12:16
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add command to open terminal in new window

4 participants