Delete Horizontal White Space

Tips Search

If you like the tips then you'll love the book!

Order your copy today:
http://www.amazon.com/gp/product/0735649928

Delete Horizontal White Space

  • Comments 3

Keyboard:  CTRL + K, CTRL + \
Menu:  Edit -> Advanced -> Delete Horizontal White Space
Command:  Edit.DeleteHorizontalWhiteSpace
Versions:  2008,2010
Published:  4/3/2010
Code:  vstipEdit0037

 

Want to get rid of some extra spaces?  You can!  First find a line that has some extra white space you want to get rid of:

image

 

Put your cursor in the extra white space:

image

 

Then go to Edit -> Advanced -> Delete Horizontal White Space or hit CTRL + K, CTRL + \ and it will get rid of the extra space:

image

 

Interestingly, this also works between things as well just find some space and put your cursor in it:

image

 

Then blow the extra space away:

image

 

NOTE:  it will leave one space when you use this feature BETWEEN things.

  • Awesome! One guy on My team is always using backspace at the beginning of a line to delete the line. I can actually see the spaces jump to the end of the previous one. Now at least I can quickly clean up after him.

  • This is so screwed up  in VS 2010 that it is no longer usable. If you the alt + mouse Left to drag select text then press delete white space you are toast.

    It removes all spacing on all but the first line.

  • JD,

    I'm not sure what you are saying here.  None of the versions have supported doing box selection with delete horizontal white space.  You can select entire lines and it works just as expected.  Let me know what you were expecting.

    Z

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