Highlight found key word VS2010 - visual-studio-2010

I am using Visual studio 2010, and when I want to find a keyword (Ctrl+F). It seem that the found keyword is not highlight at all, I am very difficult to recogniza it. How can I customize this to get a more highlight effect

You can install the Productivity Power Tools from Microsoft; they introduce a Quick Find feature that highlights matches throughout the file.
As an alternative (if you wanted highlighting just so you could see at a glance what/how many matches you have in your file), you can try Find in Files (Ctrl+Shift+F), choose Current document as the scope, and a list of all matching lines will become available in the current Find Results window. This may or may not work for you.

Related

Can we change all the word at once in visual studio

If I made the same mistake several times in the same code. Is it possible for me to change all the mistakes at once rather than finding each mistake and correcting it.
For Ex:- If I have written prnt instead of print several times at different places can I change it at once and apply it for all others rather than going at each place and correcting it manually.
You can use the Find and Replace feature in Visual Studio to find prnt and replace it with print. Use Ctrl+Shift+H as a quick shortcut to find and replace.
visual studio support multiple edit.
You can use Shift+ALT+; to edit all the same words in current file.
For this blog: Visual Studio Tips and tricks: Multi-line and multi-cursor editing you can get more infomation.
You can also change it in for the whole solution.
Use Ctrl+Shift+H on visual studio set the word you want to replace, type in the new word to be replaced, set whether it should be replaced for the entire solution or for that document alone. click replace.
Cool right?

Distinct Find in Files search results in Visual Studio 2010

I develop WPF and Silverlight application so I use source file links a lot. When I search for something, Visual Studio displays multiple same results in Find Results window - one for each file link which looks quite cluttered.
Is there a way (setting/plugin) to make the search results in Find Results window distinct?
If you are searching C, C++, or C# code consider using the Sando Code Search Tool (a free, open-source extension for Visual Studio). It eliminates duplicate results in many cases, only returning a single result for each program element (i.e., class, method, or field) that is relevant.
Here is an animated gif of it in action:
Full Disclosure: I am the project lead for this extension so I may be biased :)
I did one more search in Visual Studio gallery and I've eventually found what want: Ultra Find
It offers a few more features than the standard VS Find in Files but more importantly it shows only distinct results for linked files!
There are much better "find" or "navigation" plug-ins out there. I personally use ReSharper's Navigation and Search features to find whatever I need within a few keystrokes.
CodeRush and JustCode have similar features, too.
By selecting "Display file names only" in the options for "Find in files" it limits the results list to unique entry per file with matches.
This may be a more useful view of the search results for your usage?

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

Visual Studio: Is there an incremental search for the entire solution?

I am very fond of the keyboard shortcuts built into Visual Studio. One of my favorites is Ctrl+i, which triggers the incremental search. It jumps over the text in the current document as I fill in the searchword. After the desired searchword is typed, I use F3 to jump through the matches.
It works fine, except that is is limited to searching in the current document. Also, triggering incremental search, automatically changes the Look In option in the Find And Replace dialog to Current Document.
Is there an incremental search for the entire solution? Is there a keyboard shortcut for it? Or at the very least is there a way to prevent an usage of incremental search from changing the Look In option?
I use Ctrl-Shift-F which is Find in Files. Once I get a list of results, you can hit F8 and Shift-F8 to cycle through them. Ctrl-I does not affect the scope of this search.
Also, after you've found your first match with Ctrl-I, you don't have to hit F3, you can just hit Ctrl-I and Ctrl-Shift-I to cycle through the matches.
In addition, a quick way to jump to a specific file or class is to use something like SonicFileFinder
ReSharper has some really nice navigation and search features, including an incremental Go To Type search which works across the whole solution.
Visual Sidekick performs incremental search over the whole solution. You can search for file names and for symbols names as well. This tool has been a huge time saver for the C++ development we do. It is ridiculous that Visual Sidekick works better than Visual Studio's own IntelliSense. It hasn't been updated in a while though and doesn't support Visual Studio 2010 yet. ReSharper doesn't seem to support C++ though.
Visual Assist X supports many languages (C++, C#, VB, ASP/ASP.NET, HTML, XML, JavaScript, VBScript, XAML) but it offers a lot of refactoring tools that usually don't work with C++ (e.g. Find References) because C++ is so difficult to parse (macros, templates, etc).

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!
Check out this question and the related answers:
How to highlight occurrences of a search term in text in Visual Studio?
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).
The same feature is also available in Eclipse. Very useful.
Sara Ford has a post on her blog about making a custom editor. Might be a good starting point for investigating writing your own addin or editor for achieving your goal.
http://blogs.msdn.com/saraford/archive/2006/08/09/693548.aspx

Resources