i'm trying highlight range in vim via vimscript. know how set selection:
setpos('.', [0,<line0>,<col0>]) normal! v setpos('.', [0,<line1>,<col1>]) but, selection highlight lines/columns long buffer in focus. switching different window make go away.
i aware of match command. ideal, since let me use defined highlight define how colored/styled. however, match matches on regex, not line/column.
how do this? there way this??
in vim regex can match on lines \%<num>l , columns \%<num>c (read :help \%l , :help \%c)
example match 3rd line , 3rd column can use
:match error /\%3l\%3c./ the dot needed since matches 0 width.
Comments
Post a Comment