[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


Essential Visual Studio Keyboard Short Cuts

Published on
9,107 Points
1 Endorsement
Last Modified:
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...  

   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

Featured Post

OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

Overview of OneDrive and collaboration.
Watch this online video tutorial and learn the best way to reduce Outlook mailbox size using Compact Now feature of Outlook. It removes the deletes item's space from Microsoft Outlook 2016, 2013, and 2010 and compresses the PST file size. This will …

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month