Thought I’d put up my personal reference for Visual Studio’s keyboard shortcuts and update on a periodic basis. Not sure how to organize this so expect this to change/evolve. For now it is somewhat based on the ones I use most often, since those will be the easiest to remember
.
Insert empty line above cursor
Ctrl + Enter
Insert empty line below cursor
Ctrl + Shift + Enter
Comment/Uncomment
Ctrl + K, C / Ctrl + K, U
Highlight the lines you want to comment/uncomment
Delete an entire line
Ctrl + L
Toggle Set/Unset Bookmarks
Ctrl + K, K
Go to Next Bookmark
Ctrl + K, N
Format the entire document
Ctrl + K, D
Format the entrie selection
Ctrl + K, F
Highlight/select entire text to be formatted.
Update reference (add a using statment for C#)
Ctrl + .
Have the cursor on the text that is missing the reference.
Quick watch (Debugging)
Ctrl + Alt + Q
Highlight the code you want to watch and hit the sequence to add it to the quick watch dialog.
Collapse document block
Ctrl + M, O
I can’t seem to recall how to uncollapse the entire document.
Toggle collapse/uncollapse current block
Ctrl + M, M