Wednesday, January 23, 2008

#1 Faster Coding

I was reading this article from a link (sorry I lost the link to the article) about how to be a faster developer and at the top of the list is becoming very good at your editor.  The author pointed out that the hot keys (the ability to navigate and execute commands without using your mouse) where essential.  I agree with him, the more you have to move your mouse the less you can type and it is a real waste of time going between the mouse and the keyboard.  However, he was ranting about EMACS and of course the Windows programmer's editor of choice is Visual Studio.

My favorite hot keys right now in Visual Studio:

Ctrl K-D : To reformat the code.  Type whatever I want, not tabs, no enter. Ctrl K-D and it is formatted correctly.

Ctrl M-O : To collapse all the regions.  Finish a bug fix, Ctrl M-O to collapse, Run Unit Test, Handle Exception in Code (automatically expands) and ignore all the collapsed code.

Ctrl F : For Quick Find.  I use find so much -- just have to hot key.

Ctrl-Atl-F : For Find in Files.

Ctrl H : For Quick Replace

Ctrl-Atl H: For Replace in Files.

Home / Ctrl-Shift-End : For Selecting All.  This works in most Microsoft products.

Ctrl -Arrows : For moving by expression as compared to the arrows which move my character.  Walk the XML quickly scanning for what I want to edit.  Press the control key to highlight (while Ctrl-Arrowing), and then delete to remove that whole word.

Ctrl-J: Reactivate Intellisense.  I use this all the time, cut and paste some text into a case sensitive language like C#, Ctrl-J to find the class with the same name -- different case, and press Enter to select it from the Intellisense list.

/// : For adding comments to method and properties. Thanks Andy.

However, this one: Ctrl-Tab is awesome.  I read about it in this MSDN Blog:  It allows you to select any open window (much like Atl-Tab in Windows).


No comments:

Post a Comment