Emacs: Delete Trailing Whitespace

By Xah Lee. Date: . Last updated: .

Delete Trailing Whitespace

Alt+x delete-trailing-whitespace
Deletes trailing whitespace, and also deletes trailing blank lines if delete-trailing-lines is t. (works on whole buffer or selection)
whitespace-cleanup
Delete whitespaces that are normally considered problem. Behavior is complex. (works on whole buffer or text selection)

Emacs, Tab, Indentation, Whitespace