Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Ctrl + Tab behavior for moving between documents in Visual Studio

Is it possible to change how Ctrl + Tab and Shift + Ctrl + Tab work in Visual Studio? I have disabled the popup navigator window, because I only want to switch between items in the tab control. My problem is the inconsistency of what switching to the next and previous document do.

Every other program that uses a tab control for open document I have seen uses Ctrl + Tab to move from left to right and Shift + Ctrl + Tab to go right to left. Visual Studio breaks this with its jump to the last tab selected. You can never know what document you will end up on, and it is never the same way twice.

It is very counterintuitive. Is this a subtle way to encourage everyone to only ever have two document open at once?


Let's say I have a few files open. I am working in one, and I need to see what is in the next tab to the right. In every other single application on the face of the Earth, Ctrl + Tab will get me there. But in Visual Studio, I have no idea which of the other tabs it will take me to. If I only ever have two documents open, this works great. As soon as you go to three or more, all bets are off as to what tab Visual Studio has decided to send you to.

The problem with this is that I shouldn't have to think about the tool, it should fade into the background, and I should be thinking about the task. The current tab behavior keeps pulling me out of the task and makes me have to pay attention to the tool.

like image 912
Jeff Cuscutis Avatar asked Aug 21 '08 20:08

Jeff Cuscutis


People also ask

How do I switch between tabs in Visual Studio?

Hold down the Ctrl key and press Tab repeatedly until you select the file you intend to switch to.

What is Ctrl Shift F in Visual Studio?

Ctrl-Shift-F is used to find all the ocuurance of a string with in entire solution and display find result window as shown below. Ctrl-F is used to find a string in the current document, project and all open documents one by one.

How do I change Ctrl tab to alt tab?

In almost any application that offers built-in tabs, you can use Ctrl+Tab to switch between tabs, just as you'd use Alt+Tab to switch between windows. Hold down the Ctrl key, and then tap Tab repeatedly to switch to the tab to the right. You can even switch tabs in reverse (right to left) by pressing Ctrl+Shift+Tab.


2 Answers

In Visual Studio 2015 (as well as previous versions of VS, but you must install Productivity Power Tools if you're using VS2013 or below), there are two new commands in Visual Studio:

Window.NextTab and Window.PreviousTab

Just go remap them from Ctrl+Alt+PageUp/Ctrl+Alt+PageDown to Ctrl+Tab/Ctrl+Shift+Tab in:

Menu Tools -> Options -> Environment -> Keyboard

Note: In earlier versions such as Visual Studio 2010, Window.NextTab and Window.PreviousTab were named Window.NextDocumentWellTab and Window.PreviousDocumentWellTab.

like image 98
thepaulpage Avatar answered Oct 04 '22 02:10

thepaulpage


Visual Studio 2010 has, built in, a way to solve this.

By default, Ctrl+Tab and Ctrl+Shift+Tab are assigned to Window.[Previous/Next]..Document, but you can, through

Tools -> Options -> Environment -> Keyboard, 

remove those key assignments and reassign them to Window.[Next/Previous]Tab to add the desired behavior.

like image 36
Zoey Avatar answered Oct 04 '22 01:10

Zoey