Created
February 15, 2012 19:09
-
-
Save wyattanderson/1838226 to your computer and use it in GitHub Desktop.
Progressively highlight long lines in Vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for OverLength use 124 and SortaOverLength 52 for similar colors in the terminal.