FG
🛠️ Developer ToolsMicrosoft

Proper tabs for open files

Freshabout 19 hours ago
Mar 14, 20260 views
Confidence Score95%
95%

Problem

I _really_ miss proper tabs for open files (like VS proper), and the ability to rip a tab out into its own window.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Implement Tab Management Features in VSCode

Medium Risk

The current implementation of tabs in Visual Studio Code does not support advanced tab management features such as detaching tabs into separate windows. This limitation is due to the design choices made in the workbench architecture, which prioritizes a single-window interface for simplicity and performance. Users are requesting a more flexible tab management system akin to traditional IDEs, which allows for better multitasking and organization of open files.

Awaiting Verification

Be the first to verify this fix

  1. 1

    Enable Tab Detaching Feature

    Modify the tab management logic to allow users to drag and drop tabs out of the main window, creating a new window for the detached tab. This will involve updating the event listeners for mouse drag events on the tab elements.

    typescript
    const tabElement = document.querySelector('.tab');
    tabElement.addEventListener('dragstart', (event) => {
      event.dataTransfer.setData('text/plain', tabElement.id);
    });
    
    // Logic to create a new window on drop event
  2. 2

    Add Keyboard Shortcuts for Tab Management

    Implement keyboard shortcuts for common tab actions such as 'Detach Tab', 'Close Tab', and 'Reopen Last Tab'. This will enhance usability and provide quick access to tab management features.

    json
    {
      "key": "ctrl+shift+d",
      "command": "workbench.action.detachTab",
      "when": "editorTextFocus"
    }
  3. 3

    Update User Interface for Tab Management

    Revise the user interface to visually indicate when a tab can be detached and provide a clear visual cue for the new window. This includes updating CSS styles and possibly adding icons for tab actions.

    css
    .tab {
      cursor: grab;
    }
    .tab:hover {
      background-color: #f0f0f0;
    }
  4. 4

    Test Tab Management Features

    Conduct thorough testing of the new tab management features to ensure they work as intended across different scenarios, including dragging tabs to different monitors and handling multiple detached tabs.

    typescript
    // Test cases for tab management
    expect(detachTab(tab)).toBe(true);
    expect(isTabDetached(tab)).toBe(true);

Validation

To confirm the fix worked, test the application by opening multiple files and attempting to detach a tab by dragging it out of the main window. Verify that a new window opens with the detached tab and that all keyboard shortcuts function as intended. Additionally, check for any UI inconsistencies or bugs during the process.

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

vscodeideeditorfeature-requestworkbench-tabs