Explorar o código

fix stripping of trailing white space in vim

weiyi %!s(int64=12) %!d(string=hai) anos
pai
achega
f1c9796d29
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      vim/settings/trailingspace.vim

+ 1 - 1
vim/settings/trailingspace.vim

@@ -12,7 +12,7 @@ if has("autocmd")
 
 
   " Are there really any files we care about that Need trailing white space?
   " Are there really any files we care about that Need trailing white space?
   "autocmd FileType c,cpp,java,go,php,javascript,python,twig,xml,yml
   "autocmd FileType c,cpp,java,go,php,javascript,python,twig,xml,yml
-  autocmd BufWritePre <buffer> call StripTrailingWhitespace()
+  autocmd BufWritePre * call StripTrailingWhitespace()
 
 
   function! StripTrailingWhitespace()
   function! StripTrailingWhitespace()
     " Preparation: save last search, and cursor position.
     " Preparation: save last search, and cursor position.