15

(Using Visual Studio 2010 Express)

When you do CTRL+Tab on the editor of Visual Studio, it navigates to the next document window (the name of the shortcut is Window.NextDocumentWindowNav). Should you let CTRL key downed, it shows the navigation window where you can see all tool windows and editor tabs opened.
Without taking in account the navigation window, this shortcut enables to navigate between two tabs: the current one and the last one that had focus.

I think it's not a very optimized behavior because if you want to set focus on a third tab, you have to let CTRL key down to get the navigation window, then search for your tab, then click on it (or rotate between all tabs with the Tab key).

I would rather have a shortcut that rotates between opened tabs like any application (browsers like Firefox, IE, ..., Excel, ...) but I couldn't find any shortcut to do that in the Tools window corresponding to the desired behavior.

Do you know if it is possible to set a such keyboard shortcut?

EDIT

It seems that this shortcut is only available through plugins - that means that the Express version is not able to get this function for now.

Otiel
  • 1,790

6 Answers6

13

In Visual Studio 2010, the menu Tools > Options > Environment > Keyboard: Show Commands Containing: type NextDocumentWindow, lets you find and select the Window.NextDocumentWindow in the list. It shows that the shortcut is Ctrl+F6. This shortcut lets you cycle through currently open documents. Ctrl+Shift+F6 navigates in reverse order.

Edit: I tried also Ctrl+Alt+PgDown and Ctrl+Alt+PgUp shortcuts do about the same thing.

Hope that helps.

10

Indeed, Window.NextTab and Window.PreviousTab can be used in Keyboard Shortcuts to switch between tabs in the order displayed (while Window.PreviousDocumentWindow does not respect that order).

Shortcuts are defined by default (Ctrl+PgDn / PgUp), the only thing is that it is shadowed by Edit.ViewBottom and Edit.ViewTop. You need to remove or redefine these shortcuts and then Ctrl+PgDn/PgUp will allow you to navigate between tabs just like in VS Code.

Brunni
  • 211
8

In Visual Studio 2019, the command name for next tab and previous tab is Window.NextTab and Window.PreviousTab respectively.

4

From VS 2010: How do I get “next tab”, “prev tab” keyboard shortcut working? :

You should map the Window.NextDocumentWellTab and not View.NextTab and remove it from any other functions it's assigned to. Only mapping it will not work, you also need to unmap from anything else its being used on, apparently.

This is what my keyboard configuration looks like: Keyboard options

Looked into this some more, and it turns you need to install the Productivity Tools. That gives you that NextDocumentWellTab function.

harrymc
  • 498,455
2

In Visual Studio 2022 it is Window.NextDocumentWindow and Window.PreviousDocumentWindow

And if you are using the french version, you have to search : Fenêtre.tabulationsuivante and Fenêtre.tabulationprécédente

herve
  • 155
0

If adding your shortcut to the command hasn't worked, make sure that the shortcut is not bound to any other commands. When you enter a shortcut in the "Press shortcut keys" box, open the "Shortcut currently used by" dropdown to see all commands that the shortcut is bound to.