Created
April 23, 2012 03:14
-
-
Save sgharms/2468632 to your computer and use it in GitHub Desktop.
Kill whitespace with fire
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:ScourgeWhitespace(flag) | |
"{{{1 | |
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