|
@@ -401,11 +401,11 @@ hi MatchParen ctermfg=160 ctermbg=NONE cterm=underline guifg=#df0000 guibg=NONE
|
|
|
function! DeleteTrailingWS()
|
|
function! DeleteTrailingWS()
|
|
|
if !exists('b:noStrip')
|
|
if !exists('b:noStrip')
|
|
|
exe "normal mz"
|
|
exe "normal mz"
|
|
|
- %s/\s\+$//ge
|
|
|
|
|
|
|
+ keepp %s/\s\+$//ge
|
|
|
exe "normal `z"
|
|
exe "normal `z"
|
|
|
endif
|
|
endif
|
|
|
endfunction
|
|
endfunction
|
|
|
-au BufWrite * :call DeleteTrailingWS()
|
|
|
|
|
|
|
+au BufWritePre * :call DeleteTrailingWS()
|
|
|
au FileType go let b:noStrip=1
|
|
au FileType go let b:noStrip=1
|
|
|
|
|
|
|
|
if !has("nvim")
|
|
if !has("nvim")
|