Say that I want to highlight a region expressed in terms of two coordinates of the form (line, column)
, e.g. C1 = (l1, c1)
to C2 = (l2, c2)
.
I read :h matchaddpos()
but it seems that you can only specify entire lines or single characters to highlight, or you can express a range through starting position + length, which would lead to not very readable solutions, although the latest could be interesting as it would require the definition of a distance in the metric space built on the buffer’s coordinates set.
:h matchadd()
requires a pattern but I am not sure how should I specify patterns for ranges expressed in terms of coordinates of the form (line, column)
.