Compartilhar via


Visual Studio Tip #3: Use “Navigate To”

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.

image

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.

image 

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

image

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.

image 

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.

(next tip: Code Snippets)