Last Updated: May 15, 2019
·
435
· iiseymour

Emacs: Auto-Trim

Throw the following in your ~/.emacs file to remove any trailing whitespace from the buffer every time you save:

(add-hook 'before-save-hook (lambda () (delete-trailing-whitespace)))