Question

ViM has this option hlsearch where a searched string is displayed in highlight mode at all places in the file it is found. Is there a way to do the same in Visual Studio?

That is, if I search for "foobar", then all the foobar in the file are shown highlighted and this display remains until my next search. I find this very useful to see the places in a function where a certain variable is used (without having to manually search for the next appearance of that string).

I am aware of the Visual Studio Task List which can be used to look up strings like TODO. I hope the reader realizes that this is not a good fit for my problem which is more general text search and highlight.

Was it helpful?

Solution

I use the RockScroll add-in. It has multiple features, one of them is that if you double click on a word it will be highlighted everywhere in the file. This is very similar to what you describe. It is free (as in beer).

OTHER TIPS

If you like vim and are using Visual Studio you may want to check out Viemu.

The hlsearch Feature is of course included.

Example Picture:

Viemu hlsearch http://dklein.taunus.de/viemuhlsearch.png

With best regards.

Visual Assist X does this, along with something akin to light-symbol-mode. Among other things, of course.

Visual Studio 2010 now supports Reference Highlighting. Click on or move the cursor to any symbol such as names of variables, classes, methods, properties, etc. and it will highlight all other references in the file. It also allows you to navigate between the references using:

ctrl+shift+down arrow or ctrl+shift+up arrow

If you happen to really like Vim, you might want to look into ViEmu for Visual Studio . I'm just a really happy user of it :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top