Skip to content

Instantly share code, notes, and snippets.

@bbcoimbra
Created July 2, 2010 13:39
Show Gist options
  • Save bbcoimbra/461370 to your computer and use it in GitHub Desktop.
Save bbcoimbra/461370 to your computer and use it in GitHub Desktop.
function! RemoveTraillingSpaces()
let cursor_pos = getpos(".")
%s/[ \t]*$//g
call setpos(".", cursor_pos)
endfunction
au BufWrite *.rb :call RemoveTraillingSpaces()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment