Skip to content

Instantly share code, notes, and snippets.

@Raimondi
Forked from sgharms/gist:2308471
Created April 5, 2012 06:34
Show Gist options
  • Save Raimondi/2308477 to your computer and use it in GitHub Desktop.
Save Raimondi/2308477 to your computer and use it in GitHub Desktop.
remove_ws.vim
function! s:ScourgeWhitespace(flag)
if a:flag
echo "Killing whitespace with fire..."
%s/ \+$//
else
echo "Gently helping you to remove whitespace..."
%s/ \+$//c
endif
endfunction
command! -bang ScourgeWS call s:ScourgeWhitespace(<bang>1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment