13

(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.

1

6 Answers 6

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

1
  • These seem to STILL do the crazy stupid unintuitive tab order. Why does Visual Studio make visual tab switching shortcuts easy?
    – Pete Alvin
    Jan 31, 2023 at 20:00
12

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.

5
  • 6
    Not exactly. CTRL+F6 seems to rotate in a "last visited tab" like the tabs are sorted on the navigation window of the CTRL+Tab shortcut. I would like to rotate between tabs in a "left to right" order.
    – Otiel
    Aug 11, 2011 at 13:25
  • 3
    @Leito: see my edit. please: Ctrl+Alt+PgDown and Ctrl+Alt+PgUp seem to do that in my VS2010... Aug 11, 2011 at 13:28
  • Ctrl+Alt+PgDown/up don't have any action by me. Do you see any registered shortcut in the Tools window for these keys? Could you tell me their names? Thx
    – Otiel
    Aug 11, 2011 at 13:53
  • 3
    @woohoo: CTRL Alt PgDN/UP is part of the Productivity Power Tools. . .
    – surfasb
    Oct 2, 2011 at 4:06
  • ctrl+alt+pu/d appears to work in 2019 pro without plugins. Not sure if that's part of "pro" or if it was integrated in all newer versions of vs.
    – memtha
    Oct 5, 2020 at 17:38
8

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

6

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.

4
  • 2
    THIS IS THE WAY. Works just like every other app. May 19, 2023 at 12:55
  • 1
    This still works on Visual Studio 2022. Just be sure to previously remove the shortcuts from Edit.ViewBottom and Edit.ViewTop
    – Cesar Vega
    Mar 17 at 6:03
  • 1
    THANK YOU! None of the zillion answers I found elsewhere mentioned this, and it instantly solved my problem with tab navigation (the ViewBottom/ViewTop bit)
    – JVC
    Mar 17 at 17:56
  • THANKS!!!!!!!!!
    – tirenweb
    Apr 3 at 14:10
4
+50

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.

5
  • "(Using Visual Studio 2010 Express)" => I can't install this plugin.
    – Otiel
    Sep 29, 2011 at 16:39
  • Sorry, I never used Express. Although: A VSIX file is nothing else than a glorified zip file, that can be extracted by changing its extension to 'zip'. You might be able to manually install it as a sub-folder of %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions\<Company>\<Product>\<Version>. See this article. See also "Installing via MSI" in this article. If Express hopefully looks in there.
    – harrymc
    Sep 29, 2011 at 16:55
  • It does not work. VS is telling me that the package Microsoft.VisualStudio.ProPack.ToolsOptionsPackage did not load correctly. I guess it's dead since it wants to access ProPack. Thanks though.
    – Otiel
    Sep 30, 2011 at 7:18
  • It seems like you are out of luck with Express. As far as I could find, no one has managed to force-install extensions in it, while NextDocumentWellTab does is only available through an extension.
    – harrymc
    Sep 30, 2011 at 8:46
  • I'm giving you the bounty for searching to make it work on my Express version.
    – Otiel
    Oct 7, 2011 at 15:37
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .