Visual Studio Tricks


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


#22 Delete the beginning white space for selected line(s)

Weather you are trying to copy/paste some code into an IM for a friend to look at, or want to better align your source code, you will want to start by removing he white space at the beginning of the line. This quick trick shows you how.

Click Screenshot To Play Video

#22 Delete the beginning white space for selected line(s)

Runtime: 1Min 11 Seconds - Resolution: 900 by 580 - File Size: 1.1 Meg

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

Snippets / Notes:

[CTRL]+K, [CTRL]+\ = Remove all white space at the beginning of the line

Visual Studio Tip / Trick #022 English Transcription:

Today’s Visual Studio video trick of the day Trick number 22 was originally posted in text by Sara Ford in August of 2007. The Trick of the day is removing white space at the beginning of the line. So you’ll notice this white space here. If you use the keyboard combination, short-cut of [CTRL]+[K], [CTRL]+[Backslash], all of the white spaces at the beginning of all lines you have selected will be removed. Now that would still be true if the lines you have selected have different indentation. So you’ll see the last four lines there [CTRL]+[K], [CTRL]+[Backslash] will all get moved to the beginning of the line. So all the white spaces deleted. Now there are some other people online that talk about the [SHIFT]+[TAB] trick and if you [SHIFT]+[TAB], that will maintain your current Tabing structure and then if you do [SHIFT]+[TAB] again you will continue to move those lines to the left until there is no more white space. So today’s trick of the day [CTRL]+[K], [CTRL]+[Backslash] to remove the beginning of the line white space.
Kick this Trick on DotNetKicks.com

1 comment(s)

  1.  avatar

    I use [CTRL] + Backspace to remove whitespace from a single line, and [SHIFT] + Tab to outdent multiple lines. When I want to paste code to IM, I use [ALT] + Mouse Drag as you showed in scottcate.com/.../002 to select a block of source code without having to outdent the lines.


RSS Feeds

All Technology Posts

Scott Cate Main Blog Feed


Visual Studio Tricks Only Feed

@ScottCate on Twitter

Facebook Profile

Twitter @ScottCate

  • 600,000,000 (yes 600 million) desktops and devices have #Silverlight Installed http://SC8.me/bCXTt6
  • The future of Silverlight with #HTML5 http://sc8.me/bCXTt6
  • My good friend walked into the casino this week and won a Brand New 2010 Camaro #FB
  • @ScottDotNetVet nice - everyone loves that temp project tip/trick #vs2010
  • PHX Free Entity Framework 4 Event 12:30-5, Sept15th http://sc8.me/9LqYo7

GetClicky Web Stats

Web Analytics