View White Space

Tips Search

View White Space

  • Comments 11

Keyboard:  CTRL + R, CTRL + W
Menu:  Edit -> Advanced -> View White Space
Command:  Edit.ViewWhiteSpace
Versions:  2008,2010
Published:  4/9/2010
Code:  vstipEdit0043

I've hijacked today's tip to remind everyone that next Monday I will start giving away $100 ThinkGeek gift certificates (one every day for about 30 days).  For details of my evil plan, go here.  Also, make sure to sign up for a Visual Studio Launch event in your area.  Happy coding!

Download the seriously cool Tip of the Day Extension to get the daily tips delivered to your Start Page!


Ever want to see the white space you are working with?  Maybe you want to know if your spaces are tabs or you have extra spaces on lines.  It's easy to view white space.  Just go to Edit -> Advanced -> View White Space (CTRL + R, CTRL + W) to go from this:



To this:


  • I've always used Ctrl-Shift-8 but Ctrl-R, Ctrl-W is easier to type if I can re-train my brain after all these years. :)

  • I Think this is a very Geek-y tip - and I love it - doesnt hurt that its my birthday.  Oh wait that doesnt start until Monday?  Oh well never mind - I still love this tip - I have a lot of code using spaces that should be using tabs - now I can see where the places to change are :)

  • muhahaha already working me for the gift certificates I see :P

  • Alternative is Ctrl-E, Ctrl-S.

  • Daniel,

    Good one!  That is a C# key mapping but you have inspired me to include additional mappings in the book.  I have had enough people ask about additional mappings that it's probably time to document them.


  • Hey Now Zain,

    Another Great one! Was looking for the hotkey -  CTRL + R, CTRL + W & o'f course you got it.

    Thx 4 the info,


  • You know that in the next revision of visual studio, this is all not going to work..

  • Forward,

    Actually it WILL work in the next version of Visual Studio and works even in the beta that you can download today.  :)


  • Yeah I wouldn't mind if you added a line as to how one can change what white space characters are displayed. In my visual studio, I don't see the tabs or anything else, only spaces. Anyways, thanks for half the pie.

  • Hey Martin :)

    Spaces and tabs are usually what you get with a feature like this.  What other whitespace would you like to see?


  • @Martin Anderson: Visual Studio automatically turns your tabs into spaces for you. As usual, this is a configurable setting. Some people prefer this because some operating systems interpret tabs as being equal to different numbers of spaces. (If I recall, it's 4 spaces to a tab in Windows, and 3 to a tab in *nix OSs)

Page 1 of 1 (11 items)
Leave a Comment
  • Please add 2 and 8 and type the answer here:
  • Post