How to highlight the same C++ variable on Visual Studio 2010 - visual-studio-2010

I am using C++ coding editor on Visual Studio 2010.
I remember the IDE will help highlight the same variables when I selected a variable.But it doesn't work now.
I have enabled the "Auto list members" and "Parameter information" on the C/C++ option.
And it doesn't help showing the members of the namespace when I type the "." or "->".
Someone please help.

AFAIK, highlighting the same variable is not available for C++ in Visual Studio 2010. However, this article does indicate that it will be available in the next version after VS 2010

This extension does more or less what you want:
Highlight all occurrences of selected word
http://visualstudiogallery.msdn.microsoft.com/4b92b6ad-f563-4705-8f7b-7f85ba3cc6bb
Double click on a word, and it will highlight all other occurrences of that word. Not that the highlighted occurrences can include commented-out code.

I have found the solution to that problem
there is a column that has the numbers of your lines of code "it's next to your lines of code", just press right-click on this column, then choose "Preferences", then show the list of "editor", then press on the "Mark Occurrences", then mark on all options which will show up to you.

Related

how to disable word automatic highlight in visual studio 2019?

In visual studio 2019, if you click a word, it will highlight all its occurrences.
But if click some blank place, it will de-highlight all.
I only want to highlight the words when double-clicking it, and de-highlight the words if I double click it again.
It differs for each programming language. For C/C++ it's:
Tools/Text Editor/ C/C++ /Advanced/Disable Reference Highlighting (in
References section)
"MultiWordHighlight" is a great extension which can replace visual studio's internal feature.

Visual Studio addin; to highlight all words which match selected word?

While using NotePad++, and select a certain word, it automatically highlights all matched words?
Does anyone know if there is a Visual Studio addin that can do this? or are there any hidden environment setting that can do this?
Check following addins
Productivity Power Tools addin
The background colour of the highlight in Productivity Power Tools is found under Tools->Options->Productivity Power Tools->Enhanced Scroll Bar->Words Matching The Caret Location Color In The Editor.
or
Use Highlight selected word addin.
I believe Visual Assist can do that. This can be switched on in Settings -> Refactoring -> Automatically highlight references to symbol under cursor.
This is something that is automatically done by VS 2010 though if you are using an older version of VS you can get that functionality with third-party addins. For example I used to use an add-in called RockScroll that could highlight usages in a source file (By double clicking on the word) http://www.hanselman.com/blog/IntroducingRockScroll.aspx.
Also ReSharper has that functionality built into it with Cntl + Shft + F7

Visual Studio search results highlighting

Is there any way to highlight search results in Visual Studio? Note, I'm specifically asking about the "Find Results" window. An example of what I'm looking for is the GNU grep --color option.
This feature isn't available in VS, all what you can do is to use "Bookmark all" button in the Find dialog (expand "Find options" to see the button).
Or you can use a plugin to do that, such as ReSharper Highlight Usages in File feature.
The new coderush express does highlighting on a term if you tab over it. So if you want to tab through all instances of p_fooOBJECT, put the cursor in p_fooOBJECT and hit tab and they will all be underlined (or eles I completely misundersttod your question.)
There is a free Find Results Highlighter plugin for Visual Studio 2010.

Highlight all references to X?

The Eclipse IDE has a neat little feature that I really miss in Visual Studio.
If I place the cursor on a variable or method name, the IDE will automatically highlight all references to it in the current document within the relevant scope.
I can't seem to find an option to turn on similar behaviour in VS2008 or Resharper 4. I know VS has a Find Usages function, but I'd like to do it automatically on the fly.
Does anyone know of a free addin which will add this functionality?
If you're using ReSharper, you can highlight the usages in the file with Shift-Alt-F11. Place your cursor on the variable you want to find usages of, and press the Shift-Alt-F11 combination.
There is an add-in for Visual Studio that will do something similar called RockScroll.
When you double click on something, it will highlight all occurrences of the item you double clicked. It also changes the vertical scrollbar to a "syntax highlighted thumbnail view" showing an overview of where the item occurs in the file.
I know you mentioned ReSharper, but CodeRush has a nice references window that you can dock and let it search for things on-the-fly or on demand. As a bonus, you can select each usage and it will show you the context surrounding the usage. It also works for methods.
I mentioned CodeRush since they have an express edition, which looks like it includes that feature, but I haven't tried that edition.
Visual Studio 2010 has sorta implemented this, but the feature is somewhat lacking. There is a non-configurable delay between placing the cursor and highlighting.
The RockScroll Addin is not available for Visual Studio 2010 and above.
As a replacement, the free "Highlight all occurrences of selected word" plugin will highlight all occurences of the selected string after a doubleclick. There is no delay as with the native vs2010 highlighter.
It is string-based, which means it works inside comments and string literals.
Microsoft published a tool that sort of does what you want.
Some of my favourite features:
Enhanced Scrollbar
Auto Brace Completion
Ctrl + Click Go To Definition
Open Containing Folder
and the list goes on.
For Visual Studio 2010 and for Visual Studio 2012

Keyword highlighting on selection in Visual Studio 2008

A little while ago I managed to get Visual Studio 2008 (C++) into a state where, if I would select a keyword (or any symbol for that matter), by either double clicking on it or highlighting it, all other instances of that symbol within the current file would become highlighted too.
This was a really useful feature.
Since then it's gone away, and I don't know how to get it back.
Please help.
#Sander - that'll be it. Thanks!
I think you've installed RockScroll. It also lights them up in the graphical scrollbar (its main feature)
I use MetalScroll, it's like RockScroll only better; it doesn't interfere with Resharper (a VS must-have) and you can set it up to only highlight if you hold down 'alt' when you double-click.
There is something called "WordLight" by Mikhail Nasyrov.
An add-in for Visual Studio 2008 that highlights all occurrences of a selected text.
It searches and highlights substrings that are currently selected in a text editor.
Can be found at below link
WordLight
https://marketplace.visualstudio.com/items?itemName=MikhailNasyrov.WordLight

Resources