A Back button for code navigation

by Warlock on Jul.30, 2007, under Visual Studio

If you’re using Visual Studio 2005, you’ve probably already fallen in love with its language-aware features, such as the rename feature (allowing you to rename a variable/method/etc and update all references to it) or find all references, that lists all places in the code that reference a variable/method/etc.

One of my favorite features is the “Go To Definition” option, which will take you to where a method/variable/enum/etc is defined.  It’s really useful when you’re exploring a codebase.  The problem is, oftentimes you’ll go to a definition, figure out what you need to, and then want to go back to where you were before.  What you need is a back button, much like in a web browser.  It took a little searching, but I finally found just such a feature.  Just press ctrl+- (control and the minus key).  This will navigate back in the code, just like a back button.  One thing to be aware of is that this only works when  you use the minus located to the right of the 0 (zero) key (in the main part of the keyboard).  Using the minus in the num pad won’t work.  Jumping around like this saves a bunch of time.


Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...