Ashwin Nanjappa
Ashwin Nanjappa

Reputation: 78478

ViM-like search highlight in Visual Studio possible?

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.

Upvotes: 5

Views: 1244

Answers (5)

Ray
Ray

Reputation: 192186

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

Upvotes: 2

Ben Straub
Ben Straub

Reputation: 5776

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

Upvotes: 3

tomasr
tomasr

Reputation: 13849

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 :)

Upvotes: 0

leen
leen

Reputation: 9098

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.

Upvotes: 7

Dani van der Meer
Dani van der Meer

Reputation: 6207

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).

Upvotes: 1

Related Questions