Shortcut key for 'View in Object Browser' - visual-studio

Does anyone know if there is a shortcut key for viewing the selected object (in the text editor) in the object browser?
I am sure there was one, but I cannot find it, or anything that seems to work in the key bindings dialog.
eg:
string test = string.empty;
if (string.isnullorempty(test))
{ ^ caret here
...
}
pressing the key would open the object browser to System.String

This navigates to the correct class inside the object browser.
Shift+Alt+F12, then right click in the results and select Browse Definition
or
Ctrl+Alt+J, then type the name in the search box

F12 will go to the source (if you have it), or the object browser if it's in a referenced assembly.

Use Ctrl-Alt-J.

Yes, this is CTRL + ALT + J
Here is the reference: Object Browser Shortcut Keys, Visual C++ 6.0 Default Shortcut Option

The only way I found doing it with a single shortcut is through ReSharper and define.
Editor context menu. codewindow.navigate.resharper_navigatetoobjectbrowser
as alt +shift + j (or what you want). Maybe there is a way to create a code, link it to the functions and add the shortcut in this window without installing ReSharper, or open a ticket to visual studio teem
the shortcut

It used to be Ctrl + LeftMouseClick on what you want to search for (around 2015), but it does not work anymore in VS 2019.

Resharper navigates to the class in object browser when you press F12

Related

Go to definition in new tab without changing the view

When I do command + click on visual studio or right click and "go to definition", the file containing the definition opens in a new tab and I automatically see this file. So I change the view if the file containing the definition is another file.
Is it possible when I do this command to stay on the same file I was while still opening the other file in another tab?
Thank you for you answer.
Preferences >> Settings >> Workbench >> Editor >> Enable Preview >> Uncheck/false
If you're capable to actually go to the definition you are looking for what is called the "Peek Definition". VS Code is highly customizable so how you have it configured it could do something different.
What I think you're looking for is Ctrl + Left Mouse Click or Alt + F12.
This should tell you more, VS Code Peek Definition
Double clicking on the tab name also works if you don't want to disable preview feature of editor. Double clicked tab becomes persistent.
You can also peek definition with Alt + F12 (be sure to highlight its symbol / invocation first).
This opens the definition in a smaller resizable tab (resizable down to ~4 lines of code) and allows editing if needed.
Example (source):
Taken from:
https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition
If a language supports it, you can go to the definition of a symbol by pressing F12.
If you press Ctrl and hover over a symbol, a preview of the declaration will appear.
Tip: You can jump to the definition with Ctrl+Click or open the definition to the side >with Ctrl+Alt+Click.

Finding Visual Studio shortcut by key?

There's option menu to set shortcuts to a command.
But is there any way to find the command that binded with spefic key?
For example, I want to bind Ctrl + Alt + End for something.
But It's already binded with some other command and THIS is the command when I press Ctrl + Alt + End.
So I want to find the command and remove the bind.
Is there a way to do this with searching all the command list?
I'm using Visual Studio 2010.
Thanks in advance.
Go into the keybinding section and select any item then type in a shortcut, it will tell you what is currently assigned to that shortcut, as well as giving you the ability to override it.

Is there a keyboard shortcut to move the cursor between methods in Visual Studio 2010?

Is there any keyboard shortcut to move the cursor between methods in Visual Studio? Is there any plugins that can do the same job?
All the time when I program, I want to go at the end of the current method and if I could have a shortcut that can move the cursor at the beginning of the next method and then just have to type a couple of up arrow to be where I want would be fantastic.
Thank you.
Note: For VS <2015, the following works only for the VB.NET code editor. In VS 2015+, apparently the C# code editor is also supported.
While there are no default keyboard bindings to jump between methods, you can set them up yourself:
Go to Tools → Customize…, then Keyboard…, and do the following:
Search for the commands by typing Method in the input line at the top.
Locate the two commands Edit.NextMethod and Edit.PreviousMethod.
For each of these, select the command first, then move the input focus to the input field Press shortcut keys, enter an unassigned key combination, and press the Assign button.
(The screenshot above shows that I have previously assigned one of these commands to Ctrl+Shift+<.)
Hi another (cheaper) alternative might be the CTRL+M+M to collapse/expand the current method to it's definition, allowing you to quickly navigate to the next.
Also CTRL+M+O to collapse all members is useful, with CTRL+M+L to expand all again.
Visual Studio doesn't have such a function, but JetBrains' ReSharper does. At least is the only one that I know of to offer this functionality.
For ReSharper the shortcuts are Alt-Up and Alt-Down, for previous/next member.
Try CTRL + ALT + UP. This first takes you to the scope selector where you can select a class if applicable, then press TAB which takes you to the method selector where you can select a method from the selected scope.
Note I use In Visual Studio 2012, don't know if works in other versions.
Jason Malinowski is right on his comment. It even says the shortcut keys are Ctrl+Down Arrow and Ctrl+Up Arrow. I used to use this all the time in VB6, but when I tried it lately using recent versions of visual studio, it didn't work; it would just scroll the edit window up or down one line.
When I went into Tools -> Options, select "Environment" on the left, and then the subcategory of "Keyboard", then type "Edit.ScrollLineDown" it said Ctrl+Down Arrow. When I removed this shortcut (and the one for ScrollLineUp), the next/previous method shortcuts then worked! I'm personally very happy about this.
Obviously, if you can find the right command, you can customize your keyboard shortcuts any way you please here.
I know this is old, but looks like it was added since.
Try Alt+[ or Alt+]
In Visual Studio 2013 with the commercial Visual Assist expansion you can use ALT+M to open a list with all methods in the current file. Select one, hit ENTER and the cursor will jump to it.
do not forget about the excellent, free DPack extension, which will add Alt+m shortcut which will open a list of all methods in the current class. You can type a search string to filter, and what is also great is if you tab down and enter on a method, and then later do Alt+m again, if you tab into the window you will be on the last method you selected. DPack also has many more features, like bookmarks, but I do find that you have to setup the hotkeys, or more exactly, re-assign hotkeys from other functions to DPack: https://marketplace.visualstudio.com/items?itemName=SergeyM.DPack-16348
Its Ctrl + } - by placing the cursot to end of line - using studio 2015
Same will also bring the cursor back to bottom.
so place the cursor at end of function and press Ctrl + }
In Visual Studio 2015:
Alt + Up or Alt + Down

Hot key to pop open rename options?

When Visual Studio, when you rename a variable or type the name of a class that hasn't been included, a little box appears under the text. If you hover your mouse over it, it pops open and gives you options to either rename all the variables, or include the missing reference.
I'm sure there's a hotkey to pop this open so I don't have to use the mouse. What is it?
Press Ctrl+. to open that menu.
For me it's Shift+Alt+F10. Depending on the VS version and your keyboard settings it might be different for you.
The actual shortcut is shown in the tooltip when you check the "Show shortcut key in ScreenTips" box at the bottom of the Tools\Customize\Toolbars dialog (VS2009). This is among the first things I turn on when installing VS.
Use Shift + Alt + F10 to bring up the Resolve menu when your cursor is on the unresolved item.

Is there a hotkey in Visual Studio to open the member drop down list?

In Visual Studio there is a drop down list in the top right hand corner that you can use to navigate to the various members in the class. Does anyone know if there is a hot key to open this ddl?
I think you're looking for Ctrl + F2, which moves the cursor to the navigation bar at the top of a code view. From there, you can press Tab to move the cursor over to the member list.
For this (and pretty much every other Visual Studio hotkey/shortcut key combination), see here.
Visual Studio 2017+: They now support Resharper-like shortcuts. They work pretty well, too.
Ctrl+T - 'Go to All' (class/member/file), type m MyProp for members only
Alt+\ - 'Go to Member in current file'
Using VS 2008, I still don't know how to get directly to the Members dropdown which is what I want. But, the key bindings will be different for everyone. The command you want to search for under Options > Keyboard > Show commands containing: is Window.MoveToNavigationBar.
Assuming you are using the default keybindings packaged with Visual Studio, CTRL+F2 will focus the top-right drop-down list, and you can then navigate members by pressing TAB and using the arrow keys.
In my install of VS 2013, this is called Window.MoveToNaviationBar and is bound to Ctrl+F8. This is visual C++ settings.
Use Ctrl + F2 to get up there, then a click on Tab will get you to the member list instead of the object list.

Resources