Last active
December 20, 2015 20:49
-
-
Save jorabra/6192711 to your computer and use it in GitHub Desktop.
Vim colored margins
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
highlight ColorColumn ctermbg=235 guibg=#2c2d27 | |
" In Vim >= 7.3, also highlight columns 100+ | |
if exists('+colorcolumn') | |
" (I picked 120-320 because you have to provide an upper bound and 320 just | |
" covers a 1080p GVim window in Ubuntu Mono 11 font.) | |
let &colorcolumn="80,".join(range(100,320),",") | |
else | |
" fallback for Vim < v7.3 | |
autocmd BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1) | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How it looks:
![Example](https://camo.githubusercontent.com/2dd1036b784ff4d47b9473dae73626f9bad7873c5cc0f6043bed3916153e15fd/687474703a2f2f692e696d6775722e636f6d2f49346175644f362e706e67)