On Tue, July 12, 2011 11:33 pm, Ben Fritz wrote: > Are you asking for every other line to be highlighted in a different > color as shown in the screen shot? > > You can't do it exactly like the screenshot, and it will slow down > performance greatly, but you might be able to use a bunch of > matchadd() calls, to set up matches for all text on each line.
I tried once using several :syn match Evenl /.*/ nextgroup=Oddl :syn match Oddl /.*/ nextgroup=Evenl :hi Evenl ctermbg=Red ctermfg=Black :hi Oddl ctermbg=Yellow ctermfg=Black Unfortunately, this did not work. I am not sure why. My understanding of the syntax highlighting was, that the nextgroup parameter should force matching the next group. But somehow it ends always matching the same group. Not sure if this is a bug or my understanding is wrong. > There is no way to highlight entire lines, including empty space and > line numbers, alternating between two different backgrounds. At least, > not without modifying Vim's C code and recompiling. > There is no way to highlight entire lines, including empty space and > line numbers, alternating between two different backgrounds. At least, > not without modifying Vim's C code and recompiling. That is not entirely true. If you set up signs, you can highlight entire lines. I have made a simply plugin that makes that possible: http://www.vim.org/scripts/script.php?script_id=2998 regards, Christian -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
