Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Close Other TabsNew to Visual Studio Code? Get it now.
Close Other Tabs

Close Other Tabs

DreamThinkBuild

|
623 installs
| (1) | Free
Close all tabs and/or tab groups except for the currently active one(s), inspired by the CloseOtherWindows Sublime Text extension
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Close Other Tabs (for VSCode)

Close all tabs and/or tab groups except for the currently active one(s), inspired by the CloseOtherWindows Sublime Text extension

This VSCode extension helps you manage your open tabs and tab groups more efficiently. It provides three commands with customizable keybindings to close all non-active tabs within the same tab group, close all non-active tab groups, and close all non-active tabs in all tab groups.

Table of Contents

  • Features & Usage
  • Examples
  • Installation
  • Contributing

Features & Usage

You can access the commands via the Command Palette (Ctrl+Shift+P (Windows) or Cmd+Shift+P (macOS)) by searching for the following commands orby using their keybinding equivalents:

  1. Close other (non-active) tab groups

    Command: Close other (non-active) tab groups

    Keybindings:

    • macOS: Option ⌥+Cmd ⌘+Shift ⇧+W
    • Other: Alt ⎇+Super ❖+Shift ⇧+W
  2. Close other (non-active) tabs in current tab group

    Command: Close other (non-active) tabs in current tab group

    Keybindings:

    • macOS: Ctrl ^+Cmd ⌘+Shift ⇧+W
    • Other: Ctrl ^+Super ❖+Shift ⇧+W
  3. Close other (non-active) tabs in each tab group

    Command: Close other (non-active) tabs in each tab group

    Keybindings:

    • macOS: Ctrl ^+Option ⌥+Shift ⇧+W
    • Other: Ctrl ^+Alt ⎇+Shift ⇧+W
  4. Close other (non-active) tabs and tab groups everywhere

    Command: Close other (non-active) tabs and tab groups everywhere

    Keybindings:

    • macOS: Option ⌥+Shift ⇧+W
    • Other: Alt ⎇+Shift ⇧+W

Examples

Assume for all examples below that this filled circle symbol ● denotes an active tab or tab group, and that the unfilled circle symbol ○ denotes a non-active tab or tab group.

Initial setup used for all examples

● Group 1 │ ○ a.txt ○ b.txt ● c.txt
○ Group 2 │ ○ d.txt ● e.txt
○ Group 3 │ ● f.txt ○ g.txt
Close other (non-active) tab groups  

Command: Close other (non-active) tab groups

Keybindings:

  • macOS: Option ⌥+Cmd ⌘+Shift ⇧+W
  • Other: Alt ⎇+Super ❖+Shift ⇧+W

Result:

● Group 1 │ ○ a.txt ○ b.txt ● c.txt
Close other (non-active) tabs in current tab group  

Command: Close other (non-active) tabs in current tab **group**

Keybindings:

  • macOS: Ctrl ^+Cmd ⌘+Shift ⇧+W
  • Other: Ctrl ^+Super ❖+Shift ⇧+W

Result:

● Group 1 │ ● c.txt
○ Group 2 │ ○ d.txt ● e.txt
○ Group 3 │ ● f.txt ○ g.txt
Close other (non-active) tabs in each tab group  

Command: Close other (non-active) tabs in each tab group

Keybindings:

  • macOS: Ctrl ^+Option ⌥+Shift ⇧+W
  • Other: Ctrl ^+Alt ⎇+Shift ⇧+W

Result:

● Group 1 │ ● c.txt
○ Group 2 │ ● e.txt
○ Group 3 │ ● f.txt
Close other (non-active) tabs and tab groups erywhere  

Command: Close other (non-active) tabs and tab groups **everywhere**

Keybindings:

  • macOS: Option ⌥+Shift ⇧+W
  • Other: Alt ⎇+Shift ⇧+W

Result:

● Group 1 │ ● c.txt

Installation

You can install this extension from the Visual Studio Code Marketplace.

Contributing

Feel free to submit issues, feature requests, or pull requests for this extension on the official GitHub repository.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft