startup: respect earlier :filetype and :syntax.

If user invokes :filetype or :syntax before startup defaults are
applied, don't clobber their choices.
This commit is contained in:
Felipe Morales
2016-02-14 12:28:11 +01:00
committed by Justin M. Keyes
parent da6299445a
commit 6c9c08c370
4 changed files with 40 additions and 26 deletions

View File

@@ -337,7 +337,8 @@ int main(int argc, char **argv)
// Do ":filetype plugin indent on".
maybe_enable_filetype();
// Enable syntax (sources syntax/syntax.vim, which calls `:filetype on`).
syn_cmd("syntax");
do_cmdline_cmd("if !exists('syntax_off') | syntax on |"
"else | unlet syntax_off | endif");
}
/*