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 for s:enableHighlight in stead of s:semHighlight, as the former does in fact set b:sematicOn. It seems that s:enableHighlight clears the cache in the addition to setting b:sematicOn, and I don't know if this is desired or not.
- Make
s:semHighlight set b:sematicOn itself.
Hi, folks. If you first run
:SemanticHightlightto 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
:SemanticHightlightTogglerelies onb:sematicOnbeing set to determine if the highlight is on or not, and:SemanticHightlight(being a shortcut fors:semHighlight) does not set it.I see two solutions here:
:SemanticHightlighta shortcut fors:enableHighlightin stead ofs:semHighlight, as the former does in fact setb:sematicOn. It seems thats:enableHighlightclears the cache in the addition to settingb:sematicOn, and I don't know if this is desired or not.s:semHighlightsetb:sematicOnitself.