Hi, could someone with knowledge clarify if syntax reset is actually needed when authoring colorschemes?

From the issue description: https://github.com/vim/colorschemes/issues/34

|" Load the syntax highlighting defaults, if it's enabled. if exists("syntax_on") syntax reset endif |

Is this still necessary? ":hi clear" already achieves this as far as
I can tell.

":hi clear" causes syncolor.vim to be sourced, which, if syntax is on,
follows this path (condition true):

|if !exists("syntax_cmd") || syntax_cmd == "on" |

This causes the standard syntax links to be defined with "hi link"
rather than the "hi! link" of "syn reset", but since all groups have
already had their colours cleared, this has the same effect.

E.g.

|hi Function ctermfg=1 hi! link Function Error hi clear |

"hi clear" removes the colour and resets the link to Identifier
(tested with Vim 8.2.869).

It looks like delek is the only standard colorscheme that doesn't do an
explicit "syn reset". The others cause syncolor.vim to be sourced twice.


--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/7330a914-9146-c07c-fe80-412d626b046f%40gmail.com.

Raspunde prin e-mail lui