Created
July 30, 2013 16:02
-
-
Save kaborso/6114293 to your computer and use it in GitHub Desktop.
Put in dotfiles repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"" | |
"" Trailing space deletion | |
"" | |
func! DeleteTrailingWS() | |
exe "normal mz" | |
%s/\s\+$//ge | |
exe "normal `z" | |
endfunc | |
" Configure affected file types | |
autocmd BufWrite *.coffee :call DeleteTrailingWS() | |
autocmd BufWrite *.rb :call DeleteTrailingWS() | |
autocmd BufWrite *.md :call DeleteTrailingWS() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment