I've discovered the wonder that is colorcolumn
but I haven't yet mastered the black art of Vim scripting. If I have :set colorcolumn=80,132
in my .vimrc, how can I a) discover that I have more than one value, and b) access that 2nd value?
I have a line completion function that uses &cc
to calculate a padding value:
function! LinePadOut(c)
exec 'norm A ^['.(&cc - virtcol('$')).'A'.nr2char(a:c)
endfunction
nnoremap <expr> <C-L><C-L> ':call LinePadOut('.getchar().')^M'
This only takes into consideration the "80." How can I get at the "132" or even know it's there? I'd like to write a "long padding" version that uses the 132. (I take no credit for this function. It was someone else's magic that I poked at until it did what I wanted.)
Thanks!