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

Close Tabs to Left

Sajeeb Ahamed

|
3 installs
| (0) | Free
Adds a context menu option to close all tabs to the left of the selected tab
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Close Tabs to Left

A lightweight VS Code extension that adds a convenient context menu option to close all tabs to the left of the currently selected tab. Perfect for managing your workspace when you have many files open.

Why This Extension?

VS Code comes with "Close to the Right" and "Close All" options, but surprisingly lacks a "Close to the Left" option. This extension fills that gap, giving you complete control over your tab management workflow.

Features

✨ Right-Click Context Menu - Access "Close to the Left" directly from any tab's context menu

🎯 Smart Detection - The option only appears when there are tabs to the left to close

📊 Helpful Feedback - Get a notification showing exactly how many tabs were closed

🚀 Lightweight & Fast - Minimal performance impact on your editor

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS) to open Extensions
  3. Search for "Close Tabs to Left"
  4. Click Install

Usage

  1. Open multiple files in VS Code
  2. Right-click on any tab where you want to keep it and all tabs to the right
  3. Select "Close to the Left" from the context menu
  4. All tabs to the left of the selected tab will be closed instantly

Use Cases

  • Code Review - After reviewing files on the left, quickly close them while keeping the current file and files on the right open
  • Workflow Management - Organize your workspace by closing older/completed files on the left
  • Tab Cleanup - Efficiently manage many open files without closing everything
  • Project Navigation - Keep relevant files open while cleaning up the rest

Requirements

  • VS Code version 1.80.0 or higher

Extension Settings

This extension does not contribute any settings. It works out of the box with no configuration needed.

Known Issues

None at this time. If you encounter any problems, please report an issue on the project repository.

Release Notes

1.0.0

  • Initial release
  • Added "Close to the Left" context menu option for editor tabs
  • Smart enablement that only shows the option when applicable
  • Helpful notification showing the number of closed tabs

License

MIT

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