Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
My Favorite Keyboard Shortcuts

I'm such a wannabe ReSharper padawan. My motivation is good though: I want to be more productive.  On a recent project, I was writing some code in front of a client employee, a novice developer himself, and he exclaimed "The code is just writing itself." 

I learned a long time ago that I could impress my clients by navigating without the mouse, more recently I learned that I could get more work done without it.

Enough talk, here is my current set of favorite keyboard shortcuts.  Some are ReSharper (R#) and some are Visual Studio (VS).

VS Ctrl+K,C Comment out a block of code
VS Ctrl+K,U Uncomment a block
VS Ctrl+K,D Format your code, I prefer R#'s version but this is handy for XML.
R# Ctrl+Shift+R Presents a context-sensitive menu for refactoring.  This is a must for newbie ReSharper padawans.
R# Alt+Enter Another padawan must; this present recommended refactorings, e.Shiftg. inserting a namespace, changing accessibility of a member, etc.
R# Alt+Insert The 3rd padawan must; this helps you insert "missing" code and is essential for TDD.
R# Ctrl+Alt+Shft+F It's a handful, but it reformats your code.  This can sometimes be a bit much, and can cause some unnecessary churn in source code repository. (I do it without thinking.)
VS/R# Ctr+Space Did you know that R# will even suggest variables names?  Isn't that totally sweet? Yes. Yes it is.
R# F6 Moves a class, either to a new namespace or (my favorite) to a new file.
R# Alt+F7 Find usages.
R# Ctrl+Left Click I was giddy when I discovered this.  This is equivalent to Go To Definition.
VS Ctrl+- That's the minus key.  It's like the back button in your browser, it takes you back to the last file you were editing.  This is incredibly useful when you are writing a test, you insert a member into the class under test, and you want to jump back to the test.  w00t!

Posted 10-04-2007 11:44 PM by Christopher Bennage

[Advertisement]

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)