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条回答
beautiful°
2楼-- · 2019-01-03 11:58

My favorite: F12 (go to definition) and Shift+F12 (find references).

The latter is useful with F8 (go to next result).

Ctrl+- and Ctrl+Shift+- are mapped to my mouse's back and forwards buttons.

Ctrl+. is useful too, especially for adding event handlers and "using" statements.

查看更多
虎瘦雄心在
3楼-- · 2019-01-03 11:58

Alt+Shift+arrow keys(,,,)

This allow you to select things in a block. Like you could select all of the "int" in the block and then search and replace to double for example.

**int** x = 1;
**int** y = 2;
**int** z = 3;
查看更多
The star\"
4楼-- · 2019-01-03 11:59

Open and set focus in Solution Explorer: Ctrl+Alt+L

查看更多
啃猪蹄的小仙女
5楼-- · 2019-01-03 11:59

Ctrl+F10

run to cursor when debugging. Looked for this for ages before I found the keyboard shortcut...

查看更多
爷的心禁止访问
6楼-- · 2019-01-03 12:00

Ctrl+M, O. Can collapse and expand all sections of code in a particular file.

查看更多
我只想做你的唯一
7楼-- · 2019-01-03 12:01

Ctrl+K, Ctrl+C Comment a block

Ctrl+K, Ctrl+U Uncomment the block

查看更多
登录 后发表回答