Skip to content

Instantly share code, notes, and snippets.

@takeshy takeshy/.vimrc
Created Nov 15, 2018

What would you like to do?
remove trailing space on save
function! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
call cursor(l, c)
autocmd BufWritePre *.ts,*.rb,*.tsx,*.js,*.erb :call <SID>StripTrailingWhitespaces()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.