<

Essential Visual Studio Keyboard Short Cuts

Published on
9,144 Points
3,044 Views
1 Endorsement
Last Modified:
Approved
For many programmers out there, Visual Studio is the tool in your arsenal.  The following are a few quick tweaks and short cuts I use to streamline my visual studio experience.

First, I don't like how Visual Studio 2008 changed my beloved bookmarking, so I tweak it back to the way it was in Visual Studio 2002/3/5...  

Under
   Tools->Options, and on the Treeview, Environment->Keyboard
I modify:
   Edit.NextBookmark        to be  Shift+Ctrl+K, Shift+Ctrl+N
   Edit.PreviousBookmark to be  Shift+Ctrl+K, Shift+Ctrl+P

Then I modify
   Edit.NextBookmarkInDocument         to be Ctrl+K, Ctrl+N
   Edit.PreviousBookmarkInDocument  to be Ctrl+K, Ctrl+P

I find this is a much more intuitive use of the short-cuts for myself; especially if you've got multiple tab panes open, and are going through more than one code listing and setting bookmarks at a time; what a pain to jump between documents when it's not your intention!

Now on to the best short-cuts I love!

Ctrl+K, Ctrl+K: Set a bookmark
Ctrl+K, Ctrl+P; Default - Previous bookmark; Modification - Previous bookmark in the active document.
Ctrl+K, Ctrl+N; Default - Next bookmark; Modification - Next bookmark in the active document.
Ctrl+K, Ctrl+C: Comment selected lines of code.
Ctrl+K, Ctrl+U: Uncomment selected lines of code.
Ctrl+M, Ctrl+M: Expand / Contract region under cursor.

Finally, once you've tweaked your Visual Studio layout to however you prefer, don't forget to save and backup your settings, via Tools->Import and Export Settings...

Choose Export Selected Environment Settings, I choose All settings (uncheck, and recheck the 'All Settings' Checkbox in the tree), and save the settings.  Please don't forget to backup the settings; if something goes wrong (HDD, etc.), it can take hours to reset all your settings!

I hope you enjoyed this article,

Jacob Janzen
1
Author:jake072
Ask questions about what you read
If you have a question about something within an article, you can receive help directly from the article author. Experts Exchange article authors are available to answer questions and further the discussion.
Get 7 days free