Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad++ like search highlighting in VisualStudio

Notepad++ has a neat feature that combines search and highlighting. When you select a word, it is highlighted wherever else it shows up on the page, so it is an implicit search, which I find very very useful.

Is there a way to get that into VS?

I would also be interested in having these highlightings stick so that I can highlight more than one keyword (using different bgcolor of course), and even have all these keywords get highlighted automatically on the newer pages I open after making them stick. Now that would be really cool!

like image 267
Emrah Diril Avatar asked Nov 18 '08 19:11

Emrah Diril


People also ask

How do I highlight in Visual Studio?

On windows hold down Ctrl + Shift and on mac Command + Shift, then press the key P.

Does Visual Studio have syntax highlighting?

Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords like if or for in JavaScript differently than strings and comments and variable names.

Can Notepad ++ highlight?

Notepad++ Syntax Highlighter. Like other text editors, Notepad++ (which is recommended by the basic tutorial) uses a system called Syntax Highlighting which helps in coding by visually identifying different parts of code with color.

How do you highlight words in VS code?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.


2 Answers

Check out this question and the related answers: How to highlight occurrences of a search term in text in Visual Studio?

like image 195
nlinus Avatar answered Sep 20 '22 13:09

nlinus


Visual Studio 2010 will introduce a feature called "Highlight References" for symbols in C# and Visual Basic and it will behave as you describe. The "sticky" highlight however is not supported yet (in 2010).

like image 28
Jeff King Avatar answered Sep 17 '22 13:09

Jeff King