Skip to content

Instantly share code, notes, and snippets.

@jstirk
Created September 19, 2012 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstirk/3747294 to your computer and use it in GitHub Desktop.
Save jstirk/3747294 to your computer and use it in GitHub Desktop.
vim whitespace helpers
" ,W to strip all trailing whitespace
nnoremap <leader>W mZ:%s/\s\+$//<cr>:let @/=''<CR>`Z
" Display trailing spaces and tabs differently. In this case,
" show them as dark grey, and with certain characters.
set list listchars=tab:⇀\ ,trail:.
:highlight SpecialKey ctermfg=darkgrey guibg=black
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment