Created
May 26, 2011 17:19
-
-
Save basepi/993544 to your computer and use it in GitHub Desktop.
Pre-7.3 Vim Colorcolumn-like hack
This file contains 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
" 80-character limit highlighting for vim <7.3 Replace colorcolumn commands with | |
" the following commands | |
" Highlight 78-80 in 'Search' color | |
au BufWinEnter * let w:m1=matchadd('Search', '\%<81v.\%>77v', -1) | |
" Highlight past column 80 in 'ErrorMsg' color | |
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1) | |
" Highlight only column 81 (when it has characters in it) | |
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%81v.\+', -1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment