Hotkey for showing/hiding sidebar - visual-studio-2010

Is there a way to quickly toggl show(+focus)/collapse(+unfocus) Visual Studio 2010's sidebar (eg: solution explorer) with a keyboard shortcut?

Yes. Un-Pin the sidebars (the beautifully drawn pin icon between next to the X).
Then look at the available shortcuts under "View". For Example:
Ctrl + Alt + L - View.SolutionExplorer

Related

How perform "Go To Definition" in Visual Studio without using mouse click

I would like to perform Go To Definition without taking hands off the keyboard. Is it possible to change [Ctrl + Left Click] to [Ctrl + AnyKey] when cursor hover the target?
The F12 keyboard shortcut serves as Go To Definition for where the cursor is at. Of course, if you right click on it...it would conveniently show you the keyboard shortcut.

Keyboard shortcut for show/hide the lower pane (Error List, Output, Watch) in Visual Studio

Is there any keyboard shortcut or alternative way to show/hide the lower pane (Error List, Output, Watch etc. tabs) in Visual Studio. I am looking for something similar to Ctrl + R in Microsoft SQL Management Studio which toggles the Results pane.
I understand I can pin/unpin, resize or move around the lower pane but it is not very convenient. I like the fact that when I am typing code, Visual Studio on-the-fly shows the any coding errors, but for that I have to keep the Errors pane pinned, but that reduces my coding window, specially when working on single-monitor systems or on laptops. If I keep it unpinned, then I have to every now and then click on the Error List tab to check.
There is no command in VS2017 for toggle the tool window. For me, I install the macro extension, write a script for hiding all tool windows and binds a shortcut key to this macro.
Here is the steps:
1) First, you will need to install the Macros for Visual Studio
2) Then in macro explorer, Tools> Macro> Macro Explorer, add this macro:
var windows = dte.Windows;
for (var i = 1; i <= windows.Count; i++) {
var window = windows.Item(i);
// Check that this is a tool window and not a document
if (window.Document == null && window.Visible) {
window.Activate();
dte.ExecuteCommand("Window.Hide");
}
}
3) Set this macro as macro command 1 in macro explorer.
4) Finally, in Tools> Options> Environment> Keyboard, assign the
"Tool.MacroCommand1" to your favorite keyboard shortcut.
Peronsally, I configure Alt + * for showing/ hiding tool windows
Alt + `: Tool MacroCommand1 (for hide all tool window)
Alt + 1: View Solution explorer
Alt + 2: View Bookmark
Alt + 3: View Find results
Alt + 4: View Output
Alt + 5: View Call heirarchy
Alt + 6: View Task List
I haven't changed much from the default setup and on mine shortcuts currently exist for:
Ctrl+Alt+O - display the output
window
Ctrl+-\,Ctrl+E - display
Error window
They don't toggle though as far as I know.
Alternatively, in Visual Studio 2019...
Display or focus on a lower pane, if not already focused
Ctrl + Alt + O ( Output Window, for instance )
Once any lower pane is focused, repeat the close sequence until all lower panes are closed.
Close a lower pane
Shift + Esc
This works with the default settings and no plugins are required.
There is Hot Windows extension that provides additional commands for tool windows management.

How can I close the solution explorer panel with a key-board shortcut in Visual Studio 2010?

I often need to jump from a file to another file that I don't have open to one somewhere in the project directory structure. I often use Ctrl-Alt-L to open the solution explorer panel, but then I'd like to close it after I open the file I'm after. Unfortunately Ctrl-Alt-L doesn't simply toggle the panel open/closed. Is there another way to accomplish this. Or how can I close the solution explorer panel with a key-board shortcut?
I believe you are looking for SHIFT+ESCAPE.
It will close any tool window currently in focus.
Turn on the Auto-Hide option for the Solution Explorer panel. Now you can open it with Ctrl+Alt+L and close it with Esc. Actually Esc will set the focus back to the code editor and the Solution Explorer will auto-hide itself.
It takes two steps:
CTRL + ALT + L to put the Solution Explorer into focus.
Then SHIFT + ESC to close the tool window currently in focus.
Thank you Smash for the second step.
Turn on Auto-Hide in the Solution Explorer panel, then press Ctrl + Tab and release only the Tab key, that will open this dialog with Active Tools and Active Files lists. Select your prefered item using the keyboard or mouse.

Visual Studio Shortcut for showing list of tabs

I don't know if there is a better way to ask this. But, I mean to open the small down arrow which shows the list of tabs (see following) using a keyboard shortcut
The Command that you are looking for is Window.ShowEzMDIFileList, it can be accessed(at least on my machine) by Ctrl + Alt + Down Arrow

Visual Studio equivalent to Delphi bookmarks

I use Delphi for many years, and although I have now moved on to Visual Studio I still fondly remember numbered bookmarks (CTRL+K+1 to set bookmark 1, CTRL+Q+1 to goto bookmark 1).
Is there a Visual Studio equivalent? I'm find the dumb bookmarks in VS a chore after Delphi. I want to bookmark then return to a specific place in the file.
DPack can give you numbered bookmarks in VisualStudio.
Ctrl K + Ctrl K - Add/Remove Bookmark on Line
Ctrl K + Ctrl N - Go to Next Bookmark
Ctrl K + Ctrl P - Go to Previous Bookmark
There are other options as well. Look under Edit->Bookmarks menu,
More a comment on your original question than an actual answer but Delphi has had much easier to remember (and type) keyboard shortcuts than what you quote available for quite some time now:
Set bookmark 1: Ctrl-Shift-1
Go to bookmark 1: Ctrl-1
If you ever go back to Delphi, this should make your life so much easier! ;)
Just to amplify Lars Truijens answer. DPack is a GExperts like plugin for visual studio. I found it great help when moving from the Delphi IDE to Visual Studio.
I find this one also very useful:
CtrlK + CtrlL - Clear alll bookmarks
There is a Bookmark Window. Go to menu View/Bookmark Window (Ctrl+K, Ctrl+W).
In there you can see all your bookmarks and rename them. That is a lot better than just seeing the numbers.
For some reason they don't allow to order that list by clicking in a column header, but you can drag the bookmarks and accommodate them in the order you want.
VSBookmarks gives something like the fantastic Delphi bookmarks feature. Tested and works in Visual Studio 2019.
Extensions > Search "VSBookmarks" (v1.7 at time of writing)
Install and restart Visual Studio
Use Ctrl + Shift + N to set a bookmark
Use Ctrl + N to move to a previous bookmark
There will likely be conflicts with existing keyboard shortcuts. To view and edit these:
Tools > Options > Environment > Keyboard
In "Press shortcut keys" type Ctrl + Shift + 1
See which command(s) are currently assigned to the shortcut
Find the command in the list and remove the shortcut
Repeat for Ctrl + Shift + 1 through Ctrl + 9
VSBookmarks applies only within the current file (which is the Delphi behaviour), but is not configurable with just a single colour for the bookmark.
Delphi is an awesome language and editor. Thanks to Sergey Vinyar and Alessandro Fragnani (for the Numbered Bookmarks extension in Visual Studio Code) for keeping the flame alive.
I use:
CTRL-F2 toggle bookmark
F2 next bookmark
SHIFT-F2 previous bookmark
CTRL-SHIFT-F2 clear all bookmarks
BTW, after using Visual Studio for years I just found about a couple of months ago that you can press ALT and drag mouse to mark a column or a square.

Resources