2016-03-04 11:21 GMT+03:00 Grant Welch <[email protected]>: > Feature request: Highlight arbitrary areas of a window. > > I would like to be able to change the background color of several columns > (a la ColorColumn), rows, and specific positions. This form of highlighting > would be arbitrary, meaning it would not depend on matching text. I'd > imagine that this requested feature wouldn't make sense as an extension to > :match nor :syntax. > > Rather, it could be an extension to :highlight with the addition of two > key/arg pairs. The col= key would accept a comma-separated list of ranges > to identify the columns and, likewise, 'row=' would identify the rows. >
:highlight command currently does the only thing: it alters highlight group definitions. So it should not be an extension to :highlight, even :syntax is more suitable (though I would not use it). I think it should either be a :match/matchadd() extension or a new command, better the first. > The following statements are an attempt to articulate my expectations on > how the functionality would work, though I haven't fully vetted the ideas. > > - If neither row= nor col= are present, then the current behavior is > used. > - If only col= is present, then those columns are highlighted on every > row. > - If only row= is present, then the entire line is highlighted. > - If both are present, then the cross-section will be highlighted. > - A highlight group with either row=, col=, or both would still > function as normal highlight group in respect to :match and :syntax. > That is to say, the row= and col= are irrelevant to matching commands. > > Examples: > > " Green\Yellow\Red ColorColumns > :highlight GreenCC col=80 ctermbg=green > :highlight YellowCC col=100 ctermbg=yellow > :highlight RedCC col=120 ctermbg=red > > " Visual cue to not insert text on a particular lines > :highlight ErrorRows row=2,20,200-999 > > " Both col and row > :highlight BigBlueBox col=10-60 row=1-25 ctermbg=blue > > — > Reply to this email directly or view it on GitHub > <https://github.com/vim/vim/issues/675>. > > -- > -- > You received this message from the "vim_dev" 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 > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_dev" 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
