Davit Samvelyan wrote: > Do you have plans to add API for semantic highlighting ? > > matchadd() and matchaddpos() are doing the job, but they have several flaws: > - The positions are fixed, so when user modifies lines, it messes all the > colors until reparse is completed and matches are renewed, > - You can't add too many of them, it slows down Vim. So plugin writers have > to do workarounds like adding matches only for the visible lines, and > add/remove matches when scrolling. > - They are window specific.
There are alternatives, but all of them are compromises. - Make the matchadd() stuff faster somehow. - Add highlighting bound to marks (probably also requires updating the column of marks, which is expensive). - Integrate with syntax highlighting (keep state per line). I would think the syntax highlighting solution currently works best, since it has been optimized to cache state. -- You cannot have a baby in one month by getting nine women pregnant. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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.
