Select code window after compiling - visual-studio

When I am working on a project and compiling all the time, it gets very annoying having to select the code window with the mouse each time after compiling, is there a keyboard shortcut in visual studio to select the code window?

Back when I used Visual Studio, the F4 key went to the next error location in the code and automatically selected the code window. Also try Esc. I think the "next error" keystroke is different in more current versions of VS, so use whatever your keyboard mapping offers.

If you press Alt+W, then Visual Studio opens a list with open windows. You can then select the number corresponding to the window you want to activate. For example, Alt+W,1 activates the first window in the list.

Related

how to configure that when selecting a file and press enter in project window, the cursor jump to the editor

I am switching from visual studio to clion and find one thing annoying - when I select a file in a project window and press "enter", the selected file opened in the editor but, unlike in visual studio, the cursor stays in the project window and don't jump to the editor. However, if I use mouse and double-click on the selected file, the cursor jumps to the editor, same as in visual studio. I wonder if there is a way to configure "Enter" in project windows to go to editor as well.

How do I make Visual Studio 2015 always open files in the main window?

In VS2015, I have my find window in it's own window on my second monitor. When I double click on a file, I want it to open on my main monitor in the main window in a tab next to the rest of my code, but instead it opens in a tab next to the find results.
Anybody know how to change this behaviour?
Undock "Find Window" from Visual Studio Window, and move it to second monitor.
Solution explorer always opens new file docked in side main window.

Shortcut in Visual Studio to open solution in Windows file explorer?

Is there a keyboard shortcut in Visual Studio (currently using 2013) to open the solution (or a project) in the Windows file explorer?
Currently, I normally have to open up the Solution Explorer, right-click on my solution or a project and scroll down to 'Open Folder in File Explorer', but this becomes a time consuming task as I have to do it often (TortoiseGit not integrated with my IDE).
An improvement over #Walt_Ritscher's answer I found was to assign a keyboard shortcut to the File.OpenContainingFolder.
Instead of having to first select a project or solution from the solution project I can simply press a desired keyboard shortcut while any file is in focus (without having to open the Solution Explorer) and it will open the file location in Windows Explorer. This saves time if the focus in my solution explorer is on a file deep in the structure of my solution explorer since I don't have to scroll all the way back up to select a project/solution before hitting the keyboard shortcut.
Yes, you can add your own keyboard shortcut to open the folder.
Open the Tools/Options/Keyboard dialog. In the Show Commands Containing textbox, type OpenFolderIn and you will see the OpenFolderInFileExplorer command. Select the command, then assign a shortcut key. Move your cursor to the Press shortcut keys textbox.then press your desired key combination. In my example I chose Ctrl+Shift+'. Be sure and click the Assign button to memorize the shortcut key
Press OK and you're done.
For visual studio vs2017:
Ctrl+Shift+Alt+O

Shortcut to change which statement is executed next

When debugging in Visual Studio, I can change the line of next execution by dragging the yellow arrow to the desired line.
Is it possible to put the cursor on a line and use a shortcut to do this instead of dragging?
I'm using Visual Studio 2008 at the moment, but this can be done by right-clicking on the source and selecting "Set Next Statement" from the popup menu. I would be surprised if this has been removed from VS2010.
If that's not short enough for you, you can go into "Tools" -> "Customise" and set up a keyboard shortcut to the "Debug.SetNextStatement" command. On my current setup (perhaps not the default), you can press CTRL+SHIFT+F10.

How to maximize Visual Studio panels?

Is there a way to quickly maximize (and then restore) Visual Studio 2010 panels? For instance, I'd like to temporarily maximize the Output window or unit test results window. In Eclipse, I would just double-click the window tab, but in VS, this undocks the window.
The desired behavior is: double-click to maximize the window, then double-click it again to restore the panel to its original position.
Use this keyboard shortcut: Shift-Alt-Enter
It will maximize your current panel similar to Eclipse, but it will use the full screen unfortunately, not just the whole Visual Studio window. I prefer the way Eclipse does it, but this does help in Visual Studio land.
This feature has been added to Visual Studio Productivity Power Tools 2013 ("Double click to maximize windows"), which is free to download.
This new feature allows double-clicking any window tab to maximize it to full-screen mode and restore it back to its initial docked state - without having to worry about float operations or changes to your window layout.
In Visual Studio 2010, you can double-click the title bar of a given panel to put it into float mode, then use it just like any other window (maximize, Windows 7 dock, etc.). Ctrl-double-clicking it again will turn it back into a docked panel.
You can also right-click on the title bar and select Dock as Tabbed Document to display the panel in the same way the code windows are displayed.
In Visual Studio 2017, on a focused tab
Alt + -, F
Alt + Space, X (see UPDATE)
UPDATE (Windows 10)
Win + Up
From the View menu, pick Full Screen menuitem.
Note: when you select the View menu, you will notice that the shortcut for selecting Full Screen is mentioned, Shift+Alt+Enter (which was mentioned previously in the Answers).
Platform: Visual Studio Professional 2017, Version 15.5.7 on Windows 10, 64-bit
Closest the Eclipse behavior is to follow these steps:
Right-click the window title bar, select Float
Double-click the window title to maximize
Right-click the window title, select Dock
After these steps, double-clicking and Ctrl+double-clicking the window maximizes / restores itself
Here it is as a key board shortcut for commando types:
Ctrl+Tab Switch to your desired window/panel.
Alt+- Show the dock menu.
T Choose 'Dock as tabbed document'
Right click title bar, then choose 'float', it will only get that window, not the whole panel. Then double-click to maximize.
Also, the commands are
Window.Float
Window.Dock
and you can assign them keyboard shortcuts under tools\options. So for example I mapped them to Ctrl-Shift-F7 and Ctrl-Shift-F8, and then after once maximizing the Output window, henceforth if I have the output window docked, I just focus it and then a key makes it big and other puts it back, hurray.
If you have already installed Productivity Power Tools 2017 (PPT), and the double click file tab is not working or any other feature in PPT, just reset the PPT and it should work just fine after restarting visual studio 2017.

Resources