Skip to content

Commit

Permalink
Made long line highlighting toggleable
Browse files Browse the repository at this point in the history
  • Loading branch information
garybernhardt committed Oct 19, 2009
1 parent 3f05d38 commit a8b71ba
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .vimrc
Expand Up @@ -337,5 +337,15 @@ autocmd BufRead,BufNewFile *.feature set sw=4 sts=4 et

" Highlight lines that are too long
highlight OverLength ctermbg=darkred ctermfg=white guibg=#592929
match OverLength /\%81v.*/
function! ToggleLongLines()
if (exists("g:highlight_long_lines"))
unlet g:highlight_long_lines
match OverLength //
else
let g:highlight_long_lines = 1
match OverLength /\%81v.*/
endif
endfunction
call ToggleLongLines()
map <silent> <leader>ll :call ToggleLongLines()<cr>

0 comments on commit a8b71ba

Please sign in to comment.