EditPoint2::DeleteWhitespace Method (vsWhitespaceOptions)

 

Deletes the empty characters (white space) horizontally or vertically around the current location in the text buffer.

Namespace:   EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

void DeleteWhitespace(
	vsWhitespaceOptions Direction = vsWhitespaceOptions::vsWhitespaceOptionsHorizontal
)

Parameters

Direction
Type: EnvDTE::vsWhitespaceOptions

Optional. A vsWhitespaceOptions constant that determines how and where to remove empty spaces.

DeleteWhitespace removes white (empty) space around the edit point or TextSelection without first copying the text to the clipboard. If Direction is vsWhitespaceOptionsHorizontal, then DeleteWhitespace deletes spaces and tab characters on both sides of the edit point to the beginning and end of the edit point's line, or until a non-white-space character is encountered. If Direction is vsWhitespaceOptionsVertical, then DeleteWhitespace deletes blank lines on both sides of the edit point to the beginning and end of the document, or until a non-blank line is encountered. If Direction is vsWhitespaceOptionsVertical, and the current line is not blank, then this method does nothing.

No code example is currently available or this language may not be supported.
Return to top
Show: