Sample Header Ad - 728x90

How to automatically strip trailing spaces on save in Vi and Vim?

34 votes
4 answers
23571 views
Is there a .vimrc setting to automatically remove trailing whitespace when saving a file? Ideally (to be safe) I would like to only have this functionality for certain files, e.g. *.rb
Asked by Michael Durrant (43563 rep)
May 11, 2013, 12:50 PM
Last activity: Aug 24, 2024, 05:43 PM