Visual Studio Tip #3: Use “Navigate To”

[cross posted from my MSDN blog]

I spend a lot of time looking at other people’s code. That means a lot of time searching other people’s code. One of the main tools I use is not Search but “Navigate To”. It is found on the Edit menu or you can use the keyboard shortcut “Ctrl + Comma” to bring up this tiny window in the upper right corner of your code window.

Then just type and Visual Studio will search code files, file paths and code symbols in real time. If you select an item, that file will be displayed in the temporary reusable tab. It does not do a full substring text of your code though, so it gives a more focused search result. For example, if I search “viewmodel” get the viewmodel classes and files, but I do not get any results where I use the term “viewmodel” in the comments.

There are two handy refinements you can add into the mix here.

First is prefacing your query with ‘@’. That will refine the results down to just code symbols

Second is to use camel casing. If you use all caps camel casing you can pull up items without having to spell the whole thing out. This comes in very handy when dealing code that has long symbol names.

NOTE: Navigate To has been in Visual Studio for a while but it changed to this implementation in VS 2013. If you only have VS 2012 you can install the Power Tools for VS 2012 and get this behavior.

This post is part of a series of Visual Studio tips. The first post in the series contains the whole list.

About Negative Eddy

Professional Geek - I work for Microsoft
This entry was posted in Programming, VSTips and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s