Visual Studio Tricks


Visual Studio (2005,2008,2010) Tips and Tricks.


#19 Convert White Space; Spaces to Tabs; Tabs to Spaces.

Have you ever opened someone else’s source code (maybe an open source, code sample, or even other team mate) and the code just isn’t aligned? This can happen because of spaces and tabs. By default, Visual Studio shows a tab as four spaces. So without white space visible (Tricks #003) four spaces, looks the same as a tab. If a previous developer (who maybe wasn’t even using Visual Studio) had tabs setup differently.

This quick 50 second video, shows you how to instantly convert spaces to tabs, or tabs to spaces. Either way you like it, Visual Studio is there to make you happy.

Click Screenshot To Play Video

#19 Convert White Space; Spaces to Tabs; Tabs to Spaces.

Runtime: 49Seconds - Resolution: 900 by 580 - File Size: 1Meg

Direct Download: If the video does not work for you,
Click Here to download it.

Snippets / Notes:

[CTRL]+[R],[W] = Show / Hide White Space

Edit | Advanced | Tabify Selected Lines = Convert Spaces to Tabs

Edit | Advanced | Untabify Selected Lines = Convert Tabs to Spaces

Visual Studio Tip / Trick #019 English Transcription:

Today’s Visual Studio trick of the day, tip number 19 originally published by Sara Ford in text on July, sorry august of 2007. Today’s tip is converting white space to tabs. So I have used [CTRL]+[R],[W] to turn on the white space characters and you can see that in fact as I move my cursor each one of these is a space. And if I go to a select all then Edit | Advanced | Tabify will convert all of those spaces to a tab character. Now I can do exactly the opposite on the Edit | Advanced | Untabify and that will convert my tabs into spaces.
Kick this Trick on DotNetKicks.com

1 comment(s)

  1.  avatar

    Is there a way to enforce it so developers can't change to tabs?


RSS Feeds

All Technology Posts

Scott Cate Main Blog Feed


Visual Studio Tricks Only Feed

@ScottCate on Twitter

Twitter @ScottCate

  • Today is a good day!
  • @blaken i already like @codesmithtools :)
  • @pacitpros is hosting a 2 day IT Pro Conference in San Francisco March 22-23rd, 2012 Tech Days http://t.co/2igpJikF
  • Can you help me get to a quick 25 likes for #Mykb on Facebook? http://t.co/0WSh2GdZ
  • Meeting Planner Meltdown via/ @EventDay evn.tc/xpXHnP #Engage365 #EventProfs