Is there a quick change feature in Visual Studio Code?

The current function of providing me with a drop-down list option for which tabs are selected is so annoying. Is it possible to remove it so that the tabs work like in some modern web browser.

+225
visual-studio-code vscode-settings
Aug 15 '16 at 14:41
source share
13 answers

By default, Ctrl + Tab in Visual Studio code cycles through the tabs in the order they were last used. This is confusing because it depends on the latent state.

Web browsers switch between tabs in a visible order. This is much more intuitive.

To achieve this in Visual Studio Code, you need to edit keybindings.json . Use the command palette with CTRL + SHIFT + P , type "Preferences: Open Shortcut Keys (JSON)" and press Enter .

Then add at the end of the file:

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

Alternatively, to scroll only the 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).

+395
Aug 16 '16 at 15:33
source share
β€” -

@Combii I found a way to swap

CMD + 1 , CMD + 2 , CMD + 3 with CTRL + 1 , CTRL + 2 , CTRL + 3 , ...

On macOS, go to:

Code> Settings> Keyboard Shortcuts

On this page, select the link

keybindings.json

which is located directly below the search field and add the configuration below, then save.

 [ { "key": "cmd+0", "command": "workbench.action.openLastEditorInGroup" }, { "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" }, { "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" }, { "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" }, { "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" }, { "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" }, { "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" }, { "key": "cmd+7", "command": "workbench.action.openEditorAtIndex7" }, { "key": "cmd+8", "command": "workbench.action.openEditorAtIndex8" }, { "key": "cmd+9", "command": "workbench.action.openEditorAtIndex9" }, { "key": "ctrl+1", "command": "workbench.action.focusFirstEditorGroup" }, { "key": "ctrl+2", "command": "workbench.action.focusSecondEditorGroup" }, { "key": "ctrl+3", "command": "workbench.action.focusThirdEditorGroup" } ] 

Now you can use CMD + [1-9] to switch between tabs and CTRL + [1-3] to focus editor groups! Hope this answer is helpful.

+148
Sep 07 '17 at 3:19 on
source share

Window

When using Visual Studio code on Windows, you can use CTRL + PAGE_UP to go to the previous tab and CTRL + PAGE_DN to go to the next tab.

You also have the option of switching to tabs based on their (nonzero relative) index. You can do this by pressing and holding ALT and then a number (1 to 9).

MacOS

To quickly navigate between tabs, press and hold the CMD key, and then the number (1 to 9) of the tab you want to switch to.

You also have the option of switching between the previous / next tab using the keyboard shortcut CMD + ALT + LEFT/RIGHT .

Please note that in order to go to the tab that is in another group of editors, you must first switch to the desired group of editors.

Pro Tip . If you do not like any of the key bindings, you can change them to whatever you feel comfortable with!

+41
Aug 15 '16 at 20:28
source share

This also works on MAC OS :

Previous Tab: Shift + Cmd + [

Next Tab: Shift + Cmd + ]

+26
Mar 06 '18 at 17:20
source share

macOS - fixed 2017

In 2017, VS CODE keyboard shortcuts changed to CTRL+1, CTRL+2, CTRL+3 , etc., to switch between tabs.

CMD+1, CMD+2, and CMD+3 switch between and create tab groups

+24
Jun 30 '17 at 18:51
source share

If you use the VSCodeVim extension, you can use the Vim keyboard shortcuts :

Next tab: g t

Previous Tab: g T

Numbered tab: nnn g t

+22
Jul 18 '18 at 16:55
source share

Better suited to use alt + right and alt + left to navigate, as Jetbrains IDE Webstorm does

Here is my configuration. it also includes creating a new file and folder

  { "key": "ctrl+n", "command": "explorer.newFile" }, { "key": "ctrl+shift+n", "command": "explorer.newFolder" }, { "key": "alt+left", "command": "workbench.action.previousEditor" }, { "key": "alt+right", "command": "workbench.action.nextEditor" } 
+5
Sep 27 '17 at 10:09 on
source share

Window

previous

Ctrl + Shift + Tab

Further

Ctrl + Tab

Mac OS

previous

Shift + Cmd + [

Further

Shift + Cmd + ]

+4
Aug 13 '19 at 4:43
source share

for Linux ... I use Ctrl + pageUp or pageDown

+3
Jun 02 :
source share

This also works on MAC OS :

Press to select a specific tab: Control + 1 or Control 2, Control 3, etc.

Press to show / select all possible tabs: Control + Tab .

+2
Feb 27 '19 at 23:20
source share

Visual Studio Code v1.35.0 allows you to set the key sequences ([ Ctrl + Tab ) / ( Shift + Ctrl + Tab ) for sequential switching between editors by associating these key sequences with the commands β€œView: Open Next Editor” and β€œView: Open Previous editor "respectively.

On macOS:

  1. Go to: Code> Settings> Keyboard Shortcuts
  2. Find or navigate to the following two options:
    • View: open next editor
    • View: Open previous editor
  3. Change both key combinations to the desired key sequence.
    • View: Open the next editor β†’ ( Ctrl + Tab )
    • View: Open previous editor β†’ ( Shift + Ctrl + Tab )
  4. Most likely, you will encounter a conflicting relationship. If so, write down the command and reassign or delete the existing key binding.

If you are confused, you can always return to the default state for a given binding by right-clicking on any key binding and selecting "Reset Key Binding".

+1
Jun 10 '19 at 19:08
source share

When using Visual Studio code on Linux / Windows, you can use CTRL + PAGE_UP to go to the previous tab, and CTRL + PAGE_DN to go to the next tab. You also have the option of switching to tabs depending on their (non-zero relative) index. You can do this by pressing and holding the ALT key and then the number (from 1 to 9).

For more details: check here

0
Feb 25 '19 at 15:00
source share

Use Sublime Text Keymaps. Much more intuitive.

⌘ k ⌘ m

Import Sublime Text Keymaps:

 Name: Sublime Text Keymap and Settings Importer Id: ms-vscode.sublime-keybindings Description: Import Sublime Text settings and keybindings into VS Code. Version: 4.0.3 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.sublime-keybindings 
0
Aug 13 '19 at 4:12
source share



All Articles