On 23 September 2016, Christian Brabandt <cbli...@256bit.org> wrote: > Hi Markus! > > On Fr, 23 Sep 2016, Markus Knecht wrote: > > > Thanks, matchaddops seems to be exactly the functionality i need, > > sadly I get a failure that the function matchaddpos is unknown, > > probably I'm missing something obvious > > You need to update your vim, or you can use a translate the > matchaddpos() calls to matchadd() calls using the regular expression > atoms /\%l and /\%c and a like (see the help). But since Vim 8.0 was > just recently released, I would go with Vim 8.0
Right, same thing without matchaddpos(): function! HL(group, lstart, cstart, lend, cend) if a:lstart > a:lend return elseif a:lstart == a:lend call matchadd(a:group, printf('\%%%dl\%%>%dc\%%<%dc', \ a:lstart, a:cstart - 1, a:cend + 1)) else call matchadd(a:group, printf('\%%%dl\%%>%dc', a:lstart, a:cstart - 1)) for line in range(a:lstart + 1, a:lend - 1) call matchadd(a:group, printf('\%%%dl', line)) endfor call matchadd(a:group, printf('\%%%dl\%%<%dc', a:lend, a:cend + 1)) endif endfunction /lcd -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.