Loading...

Highlight lines in vim

To highlight lines that exceed more than 80 characters, we can colorize the extraneous characters.

Add to your ~/.vimrc

highlight OverLength ctermbg=darkred ctermfg=white guibg=#FFD9D9
augroup vimrc_autocmds
    autocmd!
    autocmd BufEnter,WinEnter * call matchadd('OverLength', '\%>80v.\+', -1)
augroup END

Every line which is longer than 80 characters will result in: Lines gt 80

vi