Extra|Trim Trailing Whitespace

Select Trim Trailing Whitespace in the Extra menu to remove whitespace from the end of each line. If you selected part of the file, only the selected lines are trimmed. If not, all lines in the file are trimmed.

If you’ve made a rectangular selection, EditPad Pro only deletes whitespace inside the rectangular block. Whitespace in the rightmost selected column and adjacent columns to the left is deleted. This whitespace needn’t be at the end of the line. If a line is short and doesn’t extend to the rightmost selected column, any whitespace at the end of the line covered by the selection is deleted.

In EditPad Pro, the Editor page in the file type configuration has an option to “trim all trailing whitespace upon save”. If you turn this on then Extra|Trim Trailing Whitespace is automatically invoked just before the file is saved. If any spaces are actually trimmed then this appears as a separate item in the undo history.

There is also a “trim trailing whitespace” option in EditPad Pro’s file type configuration. That option sets the default state of Extra|Auto Trim Trailing Whitespace.

See Also

Extra menu
Extra|Auto Trim Trailing Whitespace
Extra|Trim Whitespace
Extra|Trim Leading Whitespace
File Types|Editor