Bladeren bron

fix stripping of trailing white space in vim

weiyi 12 jaren geleden
bovenliggende
commit
f1c9796d29
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  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.