semantic-highlight.vim
semantic-highlight.vim copied to clipboard
:SemanticHightlight does not set b:semanticOn, messes up :SemanticHighlightToggle
Hi, folks. If you first run :SemanticHightlight
to enable the highlight, and then :SemanticHighlightToggle
, it will not toggle (as it disable) the highlight. It will do so from the second try though.
This is because :SemanticHightlightToggle
relies on b:sematicOn
being set to determine if the highlight is on or not, and :SemanticHightlight
(being a shortcut for s:semHighlight
) does not set it.
I see two solutions here:
- Make
:SemanticHightlight
a shortcut fors:enableHighlight
in stead ofs:semHighlight
, as the former does in fact setb:sematicOn
. It seems thats:enableHighlight
clears the cache in the addition to settingb:sematicOn
, and I don't know if this is desired or not. - Make
s:semHighlight
setb:sematicOn
itself.