othree / html5.vim

HTML5 omnicomplete and syntax
http://www.vim.org/scripts/script.php?script_id=3236
934 stars 76 forks source link

Add (necessary) boilerplate just like vim/vim #106

Closed sheerun closed 4 years ago

sheerun commented 4 years ago

This adds boilerplate for syntax file, just like upstream vim/vim: https://github.com/vim/vim/blob/master/runtime/syntax/html.vim

It is necessary in some cases, especially if plugins assume that sourcing html.vim results in the same behavior as vim/vim (for example setting b:current_syntax variable). Also it is possible in some cases that syntax/html.vim is loaded multiple times, in which case it should make startup faster.

sheerun commented 4 years ago

the let s:cpo_save = &cpo block is needed to prevent warnings when doing vim -u .custom-vimrc (which starts it in compatible mode)

sheerun commented 4 years ago

never mind, this is not proper solution. proper solution is to move syntax/html.vim to after/syntax/html.vim etc.