Going through my folder of my blog “contact me” emails, I came across this question. I like tricking Visual Studio into doing things, so I thought I’d share.
Is there a way to display only line number of coded lines, i.e. don’t number blank lines? Numbered blank lines makes showing code in powerpoint decks hard to follow.
Here’s the screenshot of what could go into your powerpoint deck.
To do this,
- Enable Word Wrap (Tools Options – Text Editor – All Languages – General)
- At the end of the first real line (like #28 above), start inserting white space until it goes off the screen. Note the Word Wrap glyph.
- Turn off the Word Wrap glyph (same place as in step 1) and Turn off “View White Space” (Edit – Advance – View White Space)
Here’s what the hack really looks like
Sorry, this isn’t the start of a new VS tip series. Just wanted to share some q&a that have come in through my blog.