Skip to content

Instantly share code, notes, and snippets.

@wyattanderson
Created February 15, 2012 19:09
Show Gist options
  • Save wyattanderson/1838226 to your computer and use it in GitHub Desktop.
Save wyattanderson/1838226 to your computer and use it in GitHub Desktop.
Progressively highlight long lines in Vim
" Highlight lines longer than 80 characters as dark-red, lines longer than 90
" characters as a brighter red.
augroup vimrc_autocmds
autocmd BufEnter * highlight OverLength ctermbg=red guibg=#990000
autocmd BufEnter * highlight SortaOverLength ctermbg=red guibg=#330000
autocmd BufEnter * match SortaOverLength /\m\%>80v.*\%<91v/
autocmd BufEnter * 2match OverLength /\m\%>90v.*/
augroup END
@theevocater
Copy link

for OverLength use 124 and SortaOverLength 52 for similar colors in the terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment