Skip to content

Instantly share code, notes, and snippets.

@jacobsimeon
Created September 12, 2013 21:02
Show Gist options
  • Save jacobsimeon/6543739 to your computer and use it in GitHub Desktop.
Save jacobsimeon/6543739 to your computer and use it in GitHub Desktop.
" highlight trailing whitespace
highlight WhitespaceEOL ctermbg=Red guibg=Red
match WhitespaceEOL /\s\+$/
" remove whitespace before save
autocmd BufWritePre {*.rb,*.js,*.coffee,*.scss,*.haml} :%s/\s\+$//e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment