Ubuntu delete whitespace using vim
MacVim icon, glossy style (Photo credit: Wikipedia) |
Well, I share to you to delete white space using vim. Please follow me.
1. Copy function below to ~/.vimrc
function! DelWhiteSpace()
%s/\s\+$//e
endfunction
autocmd BufWritePre *.rb :call DelWhiteSpace()
2. Open a file that has whitespace and write
:call DelWhiteSpace()
3. And write to save and quit
:wq
Hopefully this article is useful. :)
Komentar
Posting Komentar
terimakasih komentarnya