While I spend a lot of my time working on Visual Studio, I don't talk much about some of the features that I tend to use a lot. Here are some basic ones I use day in and day out:

VC++ 6.0 Keyboard Bindings

I've never liked and never got used to the default Visual Studio keyboard mappings. I mean, however came up with the idea that building ought to be mapped to Ctrl+Shift+B apparently thought compiling was an infrequent operation. I'll stick with my trusty VC++ 6.0 compatible keyboard bindings, thank you very much. I like me some F7 to build.

Block Selection

 This is one feature I tend to use a lot, and I hate working on an editor without it (Notepad2, which I use a lot, also supports it). I use it with Shift+Alt+ to select blocks (vertical + horizontal) sections I need to remove from code.

Very useful, for example, when you copy code from an external source with line numbers included, as it makes it trivial to remove them.

Full Screen View

When I'm working on just code (which tends to be quite a bit since I don't do much UI development), I like switching VS to the Full Screen mode. With no toolbars or other windows in the way, you get more screen space for your code. This has been particularly useful since I switched to a dark background color scheme, because it means you don't get annoying contrast from tool windows like the properties or solution explorer ones.

Switching in and out of full screen mode is easy: just use Shift+Alt+Enter.

Expand All Collapsed Regions

A lot of times when browsing through someone else's code (or through old code of yours) you'll open files with lots of collapsed regions. I find it much easier on these cases to just expand all regions and then just collapse as needed, rather than starting out with all regions collapsed. The shortcut for this is Ctrl+M,Ctrl+L with my VC++ 6.0 bindings (no idea what it is on the default bindings; I don't use them), which is actually the "Toggle Outlining Expansion", so if there's nothing to expand it will collapse everything again.

Go To Definition

The Go To Definition feature in Visual Studio 2005 comes pretty handy as well sometimes. It will generate a code file with the declaration of the selected type. While in general I tend to just use Reflector instead, sometimes this takes less time (no need to search for th type in Reflector). You can access this functionality through the context menu or using F12.

One thing I never quite understood was why this feature will take the time to grab the XML documentation for types it has it available (usually framework classes) and instead of leaving it as XML comments in the generated code it will instead format them as regular comments. Go figure.

Technorati: , ,


Tomas Restrepo

Software developer located in Colombia. Sr. PFE at Microsoft.