Visual studio setting or extension to highlight edited lines? - visual-studio-2010

I want to be able to see background highlighting on lines I have edited in Visual Studio 2010.
I know the thin strip next to the line numbers column shows edits in Green, but this isn't large enough/obvious enough.
Is there any setting or extension to help me out?
I want something like VS10x Method Block Highlighter that comes with the VS10x Code Map extension, but I was wondering if there were any options that are free or automatically highlight edited lines.

Related

Visual Studio : know how to get gapless multiline comments?

In all the text editors I use, if you make your comments have a background color, there'll be no gaps between the coloring of each line. So a 3 line comment is one big block of that background color and is simple and clean. But in VS, they put a blank line or two between each commented line and thus it looks horrendous and clutters the screen. Any ideas how to fix this? Thanks so much!
what visualStudio does vs other coding apps:
I don't believe this is currently possible.
It's a reasonable feature request however. I would suggest filing it via the "Suggest a Feature" action directly in Visual Studio. Be sure to include your screenshot.

Visual Studio -> wrap every parameter

Using Visual Studio 2019, I found a really useful refactoring option in 'Quick actions and refactoring':
(might come from PowerTools, whatever)
I just wondered how:
I can make this wrapping settings a default formatting settings
Or apply this formatting on my whole solution at once (without resharper)
For the later, a solution with Visual Studio Code would be perfect as well !
Thanks for your help
You can try using Rewrap extension which formats code, comments, and other text to a given line length (80 by default).
The main Rewrap command is: Rewrap Code / Comment, by default bound to
Alt+Q. Put the text cursor inside a comment line, block or plain text
paragraph and invoke the command to wrap. You can also select just a few lines, or multiple comments in one selection.
There is currently an Open request for this in the VS Code Issue tracker on GitHub

How to triple-slash selected text in Visual Studio 2010

In Visual Studio 2010 we can Comment selected text via Ctrl+E,C - This prefixes selected lines with the double-slash.
Is there a way to select text and have VS2010 prefix the selected lines with a triple-slash?
For the curious; I am adding XML comments to my c# code. Specifically, I am adding example code within the <example><code></code></example> section of my comments. I'm am building the sample code in a throw-away console app (just to make sure I'm creating code that works). When satisfied with the sample code, I copy/paste it into my app that I'm adding XML Comments to. When I paste the sample code, I have to manually add all the triple-slashes. I'm getting kinda bored doing this, so I'm hoping there is a way I can have VS2010 do this for me.
There is no built-in command to do that, AFAIK.
However, you can do it using VS's built-in advanced text-editing features.
Hold down Alt, select a zero-width column of text at the beginning of the lines, then type ///. This will type into all of the lines simultaneously.
You can select that with the keyboard by pressing Home (as applicable), then repeatedly pressing Alt+Shift+↓.

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 2010 Beta 2: Can I print in color?

I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting?
PS: The assignment is solving a math problem, so the choice of language isn't important and the teacher doesn't need to compile and run the program. She just wants to see our approach and results.
There is an extension now :) Visual Studio 2010 Color Printing Extension
Works well! :)
The best way I've found to accomplish this is to copy from Visual Studio and paste into something like MS Word or OpenOffice Writer.
This gives you full source code, with syntax highlighting. You can then print from Word (including adding your intro documentation before the code, etc).
Just to let everyone know, unfortunately printing in color was cut from Visual Studio 2010 because of resource constraints. Since we've rewritten the editor from scratch in WPF, we didn't have time to reimplement everything so we had to sacrifice this feature. We will try to implement this in the next version of Visual Studio. For now, copy to clipboard and paste into other app such as Microsoft Word is the recommended solution for printing code with color.
If you go to Tools -> Options -> Environment -> Fonts and Colors you can change settings to print with syntax highlighting (change 'Show settings for' dropdown to 'Printer'). But you will need to change all the individual settings to match your IDE (I don't know of a way to make it automatic)
Edit: you can use that "Use..." button next to the dropdown to copy settings from the Text Editor
Simplest of all copy code to clipboard and paste into MS-Word is the way I do and it works...
Have a look at VS.NETcodePrint 2010 availabe from www.starprinttools.com. You will be able to print and export the color coded output to PDF.
Joginder Nahil
Due the fact MSVS does not support it anymore I think the best way is really to copy the code and paste it into WinWord.
The advantages are listed below. You can
set the font/size exactly how you want it.
set the format of line numbers.
have your own header/footer.
remove #region from printing.
add a watermark to the output.
For me - I print once in 2 months a source code - it is a very comfortable way which I never could achieve with any 3rd party extension.

Resources