Showing posts with label search. Show all posts
Showing posts with label search. Show all posts

Wednesday, June 29, 2011

Exclude folders (.hg / .git) from Visual Studio search

When doing a find in files in a source controlled project in Visual Studio, the source control folder i.e. .hg (Mecurial) / .git (git) will appear in the search results (which is not what you want!)


hg folder in visual studio




You can hide folders in Visual Studio in two different ways:

For websites i.e. "open website" style projects

Simply browse to the folder in windows explorer and mark the folder as hidden in the folder properties.


set the folder as hidden in the folder properties via windows explorer


You may need to refresh the solution explore in Visual Studio to see the change.

the folder should now be hidden


This has been tested in Visual Studio 2008 and 2010 and is useful for hiding .git and .hg folder, but can be used to hide any folder.


For other projects type in visual studio (class library, web application etc). you can simply right click on the folder in the solution explorer and click exclude.

Friday, August 27, 2010

Incremental search in Visual Studio

If you have a long piece of code and your're finding that you are constantly scrolling up and down...

You can do a "search as you type" in Visual Studio 2010 to find what you need very quickly.

With a code file open press:

Ctrl + i

And then begin typing in what you are looking for (it will begin searching on the first letter).

To go to the next result, press Ctrl + i again.

To search upwards, press Ctrl + Shift + i

If you have misspelled, simply press backspace (it doesn't delete your code as you'd first think).

Great for quickly moving around a single file of code.

Monday, August 02, 2010

Visual Studio - Find a file auto-complete

In Visual Studio you can find files quickly by using a built in auto-complete feature (particularly useful to find files in large projects worked on in teams where you may not know the complete structure)
  1. press: CTRL + /
  2. type: of
  3. Then start typing in the filename (of the file you wish to open)
  4. Select the filename from the drop down box and press enter
  5. The file opens (happy developer)
This is tested to work in Visual Studio Professional 2008 / 2010 and Visual Web Developer Express 2010