aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index a5515a30f1..2070125b2e 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -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");
}
/*