[vim/vim] Add Highlight Groups For Even and Odd Lines (Issue #10935)

22 views
Skip to first unread message

Austin Liu

unread,
Aug 17, 2022, 10:33:28 PM8/17/22
to vim/vim, Subscribed

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.

I think it's nice for even and odd lines to have different highlights. It lets me quickly see which number in the line-number column any particular line corresponds to, regardless of how much whitespace is in front of it. It's a nice quality of life improvement when using relative numbers.

Currently, chrisbra's "DynamicSigns" plugin implements this functionality by adding signs to each line and giving them a different highlight whether they're even or odd. However, when a file has a relatively large number of lines, this causes an extreme slowdown and becomes almost unusable. Additionally, there are times when the signs to not update automatically.

Describe the solution you'd like

A builtin option of highlighting even and odd lines differently (LineEven and LineOdd hl-groups?). Here is an image using the DynamicSigns plugin:

image

Additional context

I have no idea about the feasibility of this, but I'm hoping it's a feature that is reasonable to add.

The highlighting doesn't even necessarily need to be tied to the line; as long as adjacent lines have different highlights, it makes it easier to see what line number each line corresponds to.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10935@github.com>

Reply all
Reply to author
Forward
0 new messages