terminal - Word-under-cursor highlighting *and* multi-highlighting in Vim -
i using 2 plugins work independently, interfere 1 slightly:
it appears both of these plugins use similar method causes highlight styles interfere 1 another.
i set highlight word under cursor underline word (i tried bolding it, little subtle , easy overlook), without changing color or anything. works wonderfully words continue use color syntax highlighting.
however once mark enabled, highlights marked words overridden cursor-word highlight. since properties of highlights not intersect should theoretically possible have mark-highlights stay same , when cursor on of them should gain underline in addition whatever other styles have applied.
is possibility given these plugins use matchadd()? matter of adding feature mark plugin can multiplex highlight styles account need layer 3 styles simultaneously? big question is, possible layer 3 styles simultaneously?
(i know it's possible layer two, because e.g. hicursorwords can underline word in comment, causes word (i set comments italic) become italic , underlined; , e.g. mark, marked word inside comment becomes highlighted (background color changed, foreground color changed, , stays italic) -- question can apply both in order result in comment word being displayed background/foreground colors changed, underlined, , still italic, when cursor on , marked?)
edit: appears matchadd() override previous style set matchadd(). if can hicursorwords plugin check if word already highlighted mark, can go , set special third style (which both highlighted , underlined). there way.
furthermore, noticed / search highlight style overrides other matchadd highlights. underline word-highlight overridden it. it'd nice if can underline show situation well.
you're right, there's no layering of highlight groups. have highlighting syntax plugin, matchadd(), , current search pattern. (there's pending patch allows have :syntax commands add / remove attributes; may find discussion on vim_dev mailing list.)
as hicursorwords plugin uses matchadd() mark, try alternative searchhighlighting plugin, offers highlighting of word under cursor, uses default search highlighting instead.
speaking of search highlighting , matchadd(), can influence goes on top via optional {priority} argument matchadd() (which must > 0 go on top).
Comments
Post a Comment