Favorite Visual Studio keyboard shortcuts [closed]

2019-01-03 11:35发布

What is your favorite Visual Studio keyboard shortcut? I'm always up for leaving my hands on the keyboard and away from the mouse!

One per answer please.

30条回答
时光不老,我们不散
2楼-- · 2019-01-03 11:44

Stock Visual Studio? F12 - Edit.GoToDefinition.

Having DevExpress' Refactor! installed means that Ctrl + ` is my all-time fave, though ;)

查看更多
戒情不戒烟
3楼-- · 2019-01-03 11:44

Ctrl+Shift+F

Good old Find In Files.

查看更多
ら.Afraid
4楼-- · 2019-01-03 11:44

Ctrl+Shift+V paste / cycle through the clipboard ring

查看更多
闹够了就滚
5楼-- · 2019-01-03 11:44

I like Ctrl+M, Ctrl+M. To expand/collapse the current code block.

查看更多
家丑人穷心不美
6楼-- · 2019-01-03 11:47

Ctrl+C, Ctrl+V to duplicate the current line

Ctrl+L to delete the current line

Ctrl+F3 to search for the current selection

Ctrl+K, Ctrl+K to create a bookmark (which are useful)

Ctrl+K, Ctrl+N to go to the next bookmark

And, here is something even more interesting:
Press Ctrl+/ to put the cursor into a box where you can type commands.

For example, Pressing Ctrl+/ and type ">of ", now start typing the name of a file in your project, and it will autocomplete. This is a very fast way to open files in the current solution.

查看更多
Viruses.
7楼-- · 2019-01-03 11:47

Visual Studio 2005/2008 keybinding posters:

These don't cover customizations, but they're good reference materials and definitely helpful for finding new shortcuts.

Also, a macro that dumps all the current bindings to a HTML file:

http://www.codinghorror.com/blog/archives/000315.html

查看更多
登录 后发表回答