Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to have (at the same time) colorcolumns in vim 7.3 with different colors, using the new colorcolumn option?

Tags:

syntax

vim

Vim 7.3 has a new option, colorcolumn.

I can set a colorcolumn color:

:hi ColorColumn ctermbg=lightgrey guibg=lightgrey

I can have how many colorcolumns I want, but I would like to know if it's possible to have two colorcolumns, each one of them with different colors. Anyone knows if this is possible, or a hack to achieve it using only this new colorcolumn feature?

like image 847
Somebody still uses you MS-DOS Avatar asked Jun 07 '11 18:06

Somebody still uses you MS-DOS


1 Answers

Don't think that is possible, but you can sort-of fake it using the proposal in this post Vim 80 column layout concerns

highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/

I.e. use colorcolumns but for the one farthest to the right, highlight everything exceeding that using the above.

like image 75
Fredrik Pihl Avatar answered Oct 05 '22 08:10

Fredrik Pihl