Created
September 9, 2021 19:21
-
-
Save Rembane/e8c69d4c293e1c21111d076fcb93afcf to your computer and use it in GitHub Desktop.
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
" Kill trailing whitespace | |
function! <SID>StripTrailingWhitespaces() | |
let l = line(".") | |
let c = col(".") | |
%s/\s\+$//e | |
call cursor(l, c) | |
endfun | |
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment