Rework long-lines plugin to use colorcolumn

This will always highlight characters that exceed the 80 character
limit with ErrorMsg, but will also highlight the 81st column, so
the user knows when to break.
vimbundler
nirenjan 2013-01-18 14:18:31 -08:00
parent 1cce3adba2
commit 11cc21f148
1 changed files with 5 additions and 3 deletions

View File

@ -16,9 +16,11 @@
" NOTE:
" This file will highlight all characters from column 81 onwards
"
" Nirenjan Krishnan nirenjan@gmail.com 2008/12/16
" Nirenjan Krishnan nirenjan@gmail.com 2013/01/19
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
match LineTooLong '\%>80v.\+'
highlight LineTooLong cterm=bold ctermbg=red guibg=LightYellow
if exists('+colorcolumn')
set colorcolumn=81
endif
autocmd BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)