Timesaving Tips for Developers

In the interest of releasing early and often I list the most helpful timesavers I know. Almost every day brings a new timesaver, so subscribe to this post - it will be updated as new tricks are discovered.

Full Screen

Most of the time I prefer and advocate a multiple-window desktop. Using that approach one can consume more information at a glance than single-window (Full Screen) mode. For example, I captured my desktop a minute ago. I am monitoring a log file, scanning a newsreader, have an accessible Explorer window, and about to IM with my buddy Steve.

On the other hand there are at least two situations in which I prefer Full Screen mode. The first is when I am programming. I prefer to focus 100% on the current user story. Thus everything on my screen should be about coding the story. In 1920x1200 resolution, full-screen mode, I can see my unit-test results and source code side-by-side. The second situation is thankfully a distant memory. When working on a small display, full-screen mode is a necessity. I often use Internet Explorer in full-screen mode just so I do not have to scroll horizontally.

These are the shortcut keys I know of:

  • Visual Studio 2005: Shift+Alt+Enter
  • Internet Explorer 7: F11

Visual Studio 2005

This is my short-list of timesavers in Visual Studio:

  • Format XML File: ^K^D
  • Navigate back: ^-
  • Delete line: Shift+Ctrl+L
  • Switch document: ^Tab (cursor keys switch tab group)
  • Close document: ^W (custom mapping)
  • Use tabbed documents for Output, Unit Test, Stack, etc. Try it, you'll see the facility immediately.

ReSharper 2.5

ReSharper helps me focus on the heavy lifting because it facilitates tedious grunt work. That said I have found ways to improve upon the default ReSharper configuration. In addition to these tips, be sure to grab our ReSharper Live Template.

  • Format C# File: Shift+Ctrl+Alt+F
  • Extract Method: Ctrl+Alt+M
  • Extract Variable: Ctrl+Alt+V
  • Extract Field: Ctrl+Alt+D
  • Extract Parameter: Ctrl+Alt+P
  • Run Unit Test
    1. Choose Tools > Customize > Keyboard
    2. Select ReSharperAddIn25.UnitTestRunner_Run
    3. Set shortcut keys e.g. ^K^T

    Now you can red-green-refactor without lifting your fingers off the keyboard.

    • Run single test: ^K^T in method
    • Run all tests: ^K^T in namespace

Subversion

Under Linux most developers prefer command-line tools. The bottom line is many tasks are simply faster that way. While Tortoise SVN is a great tool, I find that many revisioning tasks are better suited to command-line. Note that these scripts use sed - so grab GNU Unix Tools.

Windows

I have been using Windows since Windows 286 (yikes!). By now I have learned a few productivity tricks. This list is currently short - but will be expanded very soon.

  • Run command: Win+R
  • Launch Explorer: Win+E

Comments



Very useful shortcuts. One I cannot possibly live without is Edit.CollapsetoDefinitions: Alt+Q. It saves me time collapsing method, etc. definitions.



Thanks massybird. I am not familiar with Alt+Q - is that a custom mapping that you use? I am familiar with Ctrl+M, Ctrl+O for CollapseToDefinitions. Another helpful key is Ctrl+M, Ctrl+M to expand/collapse the local scope region.

Your shortcuts are welcome here.



Hey Rjae, yes, it’s custom mapping that I use. I prefer shortcuts that do not require more than one pair of keystrokes, hence Alt + Q. In addition, you only have to use your left hand for this shortcut. I guess any keystroke combination will become second-nature after repeated use…



Hi massybird,

Thanks for confirming the custom keyboard mapping. I can tell that you like your tools to be tuned to the way you work. You raise an interesting point: should the most desirable key combinations be reserved for the most common actions you perform?

I think it makes perfect sense to use whatever combinations support your velocity best. Where I tend to draw the line is when a tool like ReSharper introduces a slew of keyboard mappings. ReSharper has such a huge affect on my velocity that I let it be administrative over the keyboard mappings.

Funny, Alt+Q reminds me of one of the best editors I ever used: epsilon - a throwback to the late 80’s.

Keep the input coming; we’re all benefiting.



Some of these may be obvious for VS but perhaps not to some. I couldn’t live without these…

Ctrl-Shift-B: build
Ctrl-K, Ctrl-C/U: comment/uncomment selection
Ctrl-Space: auto completion list or auto completes if theres only 1 match, useful for fixing the casing of an identifier. For example if you have string.empty and hit ctrl-space it becomes string.Empty.
Ctrl-Tab / Shift-Ctrl-Tab: cycle through open documents Alt-Tab style
Ctrl-K, Ctrl-S: surround selection with something like region, foreach, if, class, etc… awesome shortcut
F12: go to definition



Hi Dave,

What was NBC’s slogan when Friends went to all-repeats…it went something like, “If you haven’t see it, it’s new to you!” Steve and I always reinforce with each other that disciplined verbosity is best. As long as you take the time to shape your thoughts ;-), they are guaranteed to be useful. So, thank you for the list.

Have you ever noticed that the open-document-switching dialog lists all tab-groups? You can quickly switch to a document in another tab group by using Ctrl+Tab (as you mentioned) and with a little right-hand English, press left/right cursor key. The document selector moves to the next tab-group.



If you’re into keyboard shortcuts, you should check out this free tool called Gadgets. It’s got one thing in there that shows you any command you run and shows the keyboard shortcut for it. I use it for figuring out the keyboard shortcuts for toolbar buttons I use a lot. www.slickedit.com/gadgets



One more thing, someone named Rob Caron has posted some really nice keybinding charts at http://blogs.msdn.com/robcaron/archive/2007/01/29/1552795.aspx. Definitely worth checking out.



Hey slushpuppy,

I’ll take a look at gadgets sometime tomorrow. I bought slickedit a while back and love it (I use it all the time for diffs and “beautifying” different types of code such as HTML), so I assume gadgets is worth taking a peek at, too.

Thanks.



I took a look at SlickEdit’s Gadgets…all I’ve played around with is the CommandSpy tool, but it works very well and doesn’t slow anything down at all.



Configure Debugger Exceptions: Ctrl + Alt + E

Rarely used, but those are the ones you forget until you need them.



Another timesaver for Subversion is opening a command window and issuing an update in one run command.

cmd /k "cd \archives\<working directory> && svn update"