Created
October 25, 2011 14:54
-
-
Save ishmaelahmed/1313013 to your computer and use it in GitHub Desktop.
Removes trailing spaces in vim file and return to your starting position
This file contains 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
" Removes trailing spaces | |
function! TrimWhiteSpace() | |
let line = line('.') | |
let colum = col('.') %s/+$//e | |
call cursor(line,colum) | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment