Is there a quick change tabs function in Visual Studio Code?

后端 未结 18 1753
星月不相逢
星月不相逢 2020-12-07 06:26

The current function of giving me a dropdown option of which tab to choose is just so annoying. Is there a possibility to remove it so the tabs would work like in some moder

18条回答
  •  死守一世寂寞
    2020-12-07 07:22

    By default, Ctrl+Tab in Visual Studio Code cycles through tabs in order of most recently used. This is confusing because it depends on hidden state.

    Web browsers cycle through tabs in visible order. This is much more intuitive.

    To achieve this in Visual Studio Code, you have to edit keybindings.json. Use the Command Palette with CTRL+SHIFT+P, enter "Preferences: Open Keyboard Shortcuts (JSON)", and hit Enter.

    Then add to the end of the file:

    [
        // ...
        {
            "key": "ctrl+tab",
            "command": "workbench.action.nextEditor"
        },
        {
            "key": "ctrl+shift+tab",
            "command": "workbench.action.previousEditor"
        }
    ]
    

    Alternatively, to only cycle through tabs of the current window/split view, you can use:

    [
        {
            "key": "ctrl+tab",
            "command": "workbench.action.nextEditorInGroup"
        },
        {
            "key": "ctrl+shift+tab",
            "command": "workbench.action.previousEditorInGroup"
        }
    ]
    

    Alternatively, you can use Ctrl+PageDown (Windows) or Cmd+Option+Right (Mac).

提交回复
热议问题