mirror of
https://github.com/neovim/neovim.git
synced 2025-11-11 04:55:33 +00:00
startup: Avoid VimL global. Introduce TriState enum.
- `syntax_on` is documented. Rather than introduce a new undocumented VimL global `g:syntax_off`, use a module-local flag. - Rename "maybe" functions to follow style guidelines (use standard module prefix)
This commit is contained in:
@@ -334,11 +334,10 @@ int main(int argc, char **argv)
|
||||
|
||||
// If using the runtime (-u is not NONE), enable syntax & filetype plugins.
|
||||
if (params.use_vimrc != NULL && strcmp(params.use_vimrc, "NONE") != 0) {
|
||||
// Do ":filetype plugin indent on".
|
||||
maybe_enable_filetype();
|
||||
// Enable syntax (sources syntax/syntax.vim, which calls `:filetype on`).
|
||||
do_cmdline_cmd("if !exists('syntax_off') | syntax on |"
|
||||
"else | unlet syntax_off | endif");
|
||||
// Does ":filetype plugin indent on".
|
||||
filetype_maybe_enable();
|
||||
// Sources syntax/syntax.vim, which calls `:filetype on`.
|
||||
syn_maybe_on();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user