Visual Studio keyboard shortcut for Method Name combobox

瘦欲@ 提交于 2019-11-29 06:01:46
kenwarner

Thanks to Jeff's Keyboard Shortcut Summary Macro, I discovered that Ctrl + F2 is mapped to a MovetoNavigationBar command, which pops me into the "Class Name combobox." Add a tab and I'm in the Method Name combobox.

Piotr Owsiak

An alternative way would be DPack (a free Visual Studio add-in). It allows you to navigate very quickly.

What you should first look at is Alt + U and Alt + M keyboard shortcuts, although I recemmend you going through it's options and looking at DPak's website for a brief overview.

Personally I love DPack and it's the 1st thing I add to my VS (with ReSharper right after it ;-)

t3rse

I frequently use the "collapse definitions" feature which you can access by typing the following keyboard sequence:

Ctrl + M, O

If you have code regions set up this will also collapse those and allow you to quickly zoom to different portions of your code.

I would also recommend setting up bookmarks in your code to assist navigating around easily (this works especially well for multiple files). Put your cursor on the line of code and use the following keyboard sequence:

Ctrl + K, K

Once you've got your bookmarks set, you can use the following to skip through all your bookmarks:

Ctrl + B, N

jrsconfitto

You can try the IncrementalSearch and ReverseIncrementalSearch mappings for this. It's not as straightforward as using the mouse on the combobox, but it will get you to where you're going. Just search and continue hitting the shortcut until you get to the right one.

The mapping is taken from emacs, which I got used to in college and enjoy.

The problem I run into with this is if I have a lot of similarly named methods and variables, then I have to search through to find the right one.

So to find the definition I just use Sub methodName() in the search.

This is nice for finding code fragments/methods/vars quickly without having to take your hands off the keyboard.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!