Skip to content

Instantly share code, notes, and snippets.

@yangchenyun
Created July 31, 2012 09:23
Show Gist options
  • Save yangchenyun/3215393 to your computer and use it in GitHub Desktop.
Save yangchenyun/3215393 to your computer and use it in GitHub Desktop.
vim settings to delete trailing spaces when saving files
" removing trailing spaces before saving
autocmd FileType c,cpp,java,php,coffee,javascript,ruby,python,yaml,sh autocmd BufWritePre <buffer> :%s/\s\+$//e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment