Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Eclipse's Ctrl+O keyboard shortcut equivalent in Visual Studio 2012?

Question

Is there a keyboard shortcut in Visual Studio to show all methods of the class and to quickly jump to one by typing the first few letters of the method name and pressing Enter?

This is what Ctrl+O looks like in Eclipse.

enter image description here

Image source: http://rayfd.files.wordpress.com/2007/05/ctrl_o_2.jpg?w=700

Side notes

Without using ReSharper as described here Visual Studio: Missing Ctrl+O+O, Ctrl+T Eclipse analog

And something that is better than Ctrl+F2 followed by Tab as described in this Stackoverflow answer.

like image 987
Lernkurve Avatar asked Oct 01 '12 22:10

Lernkurve


People also ask

How do I find the shortcut keys in Visual Studio?

The Global context means that the shortcut is applicable in any tool window in Visual Studio. You can look up the shortcut for any command by opening the Options dialog box, expanding the Environment node, and then choosing Keyboard.

How do I assign keyboard shortcuts in Visual Studio?

On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. In the list, choose the command to which you want to assign a keyboard shortcut.

What is Ctrl in VS Code?

VS Code provides two powerful commands to navigate in and across files with easy-to-use key bindings. Hold Ctrl and press Tab to view a list of all files open in an editor group. To open one of these files, use Tab again to pick the file you want to navigate to, then release Ctrl to open it.

What does Ctrl C do in Visual Studio code?

For example, you can use the "Ctrl+C" shortcut to copy text, or the "Ctrl+V" shortcut to paste text. You can also use keyboard shortcuts to navigate through your code, or to format and refactor your code.


2 Answers

You may use Ctrl + Shift + o (go to symbol...) as alternative.

like image 139
donah Avatar answered Oct 19 '22 17:10

donah


(I'm going to assume you're using the 'General Development' settings for keyboard shortcuts)

Without using any addins to achieve this and without using the method explained in the other SO answer about the only approaches I can think of are the following:

Use Ctrl + , to bring up the Navigate To... window, however it searches across everything not just your current file.

Or.... you could do a little keyboard gymnastics, though it's nowhere near as simple as the Ctrl+O option from Eclipse or the other approaches that have been suggested.

If you scope Solution Explorer to the current file then you can just use the Ctrl + ; to search the methods and properties in the file.

To set the scope in Solution Explorer you can use Ctrl + [,Ctrl + S to sync SE with your current file. You could then map something like Ctrl + K,S to the ProjectAndSolutionContextMenus.Project.ScopeToThis command in Visual Studio's keyboard options. The only hassle with this approach is that you'll need to click the back button to go back to the full solution explorer view.

Alternatively if you use Ctrl + [,Ctrl + O you can toggle the Open Files filter in Solution Explorer's. Assuming you don't have too many open files then this might be a pretty simple way to do it.

Sorry to say, but your best option would be to use an add-in that provides a "go to member" function, such as AsEclipse (I haven't tried it) or one of the other commercial productivity tools. You might also drop a suggestion on the UserVoice site for it.

like image 21
Richard Banks Avatar answered Oct 19 '22 16:10

Richard Banks