1. j
  2. cmd

Commits

j  committed 6663d7d

Highlight end-of-line whitespace

  • Participants
  • Parent commits f22d37e
  • Branches default

Comments (0)

Files changed (1)

File etc/vim/vimrc

View file
  • Ignore whitespace
 :noremap <Leader>i :set list!<CR> " Toggle invisible chars
 
 
+" Highlight end-of-line whitespace ********************************************
+highlight ExtraWhitespace ctermbg=red guibg=red
+au ColorScheme * highlight ExtraWhitespace guibg=red
+au BufEnter * match ExtraWhitespace /\s\+$/
+au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
+au InsertLeave * match ExtraWhiteSpace /\s\+$/
+
+
 " Toggle paste mode, hiding line numbers as well ******************************
 nnoremap <Leader>m :set nonumber! <bar> set invpaste paste?<CR>
 set pastetoggle=<Leader>m