Remove trailing whitespaces

This commit is contained in:
Sebastian 2019-10-13 20:30:43 +02:00
parent eed0856c06
commit cc53da2ad7

View file

@ -253,4 +253,15 @@ set linebreak
" Searching with "/": Ignore case if search term is lower case.
set smartcase
" Strip trailing whitespaces on each save
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
colorscheme blackboard