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:36

Ctrl+] for matching braces and parentheses.

Ctrl+Shift+] selects code between matching parentheses.

查看更多
【Aperson】
3楼-- · 2019-01-03 11:36

Ctrl+Alt+P -> Attach to process

查看更多
你好瞎i
4楼-- · 2019-01-03 11:38

Shift+ESC

This hides/closes any of the 'fake window' windows in Visual Studio. This includes things like the Solution Explorer, Object Browser, Output Window, Immediate window, Unit Test Windows etc. etc. and still applies whether they're pinned, floating, dockable or tabbed.

Shortcut into a window (e.g. Ctrl + Alt + L or Ctrl + Alt + I) do what you need to do, and Shift + Esc to get rid of it. If you don't get rid of it, the only way to give it focus again is to use the same keyboard shortcut (or the mouse, which is what we're trying to avoid....)

Once you get the hang of it, it's immensely useful.


Grrr....The amount of times of hit Ctrl + F4 to close the 'window' only to see my current code window close was insane before I found this, now it only happens occasionally..

查看更多
唯我独甜
5楼-- · 2019-01-03 11:41

For me, it's nothing to do about auto completing code, matching parenthesis or showing some fancy tool panel. Instead, it's just about letting me see the code.

With all the panels surrounding you, the area you use to actually write code becomes too small.

In this cases, Shift+Alt+Enter comes in to the rescue and gets the code window in focus in full screen mode. Hit it again, and you have all the panels back.

查看更多
女痞
6楼-- · 2019-01-03 11:43

When the IntelliSense drop down is displayed, holding down Ctrl turns the list semi-transparent so you can see what is hidden behind it :)

查看更多
▲ chillily
7楼-- · 2019-01-03 11:44

Incremental Search - Ctrl + I

It's basically the find dialog box without the dialog box. Just start typing what you want to search for (look at the bottom status bar location to see what you've typed). Pressing Ctrl + I again or F3 searches for the next instance. Press Escape to quit. Starting a new search by pressing Ctrl + I twice repeats the last search.

查看更多
登录 后发表回答