diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2016-02-14 12:28:11 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-02-14 15:38:11 -0500 |
commit | 6c9c08c3703b2044bce2cdd5b20e66222cf46483 (patch) | |
tree | 91b8866e7000a6dd8d4ebe4c3664b9d07918e461 /runtime | |
parent | da6299445a0fd52be5af2d7ea9ee539f12c20a73 (diff) | |
download | rneovim-6c9c08c3703b2044bce2cdd5b20e66222cf46483.tar.gz rneovim-6c9c08c3703b2044bce2cdd5b20e66222cf46483.tar.bz2 rneovim-6c9c08c3703b2044bce2cdd5b20e66222cf46483.zip |
startup: respect earlier :filetype and :syntax.
If user invokes :filetype or :syntax before startup defaults are
applied, don't clobber their choices.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/starting.txt | 4 | ||||
-rw-r--r-- | runtime/syntax/nosyntax.vim | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index ed3f379275..be108d4633 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -437,7 +437,9 @@ accordingly. Vim proceeds in this order: 5. Enable syntax highlighting. This does the same as the command: > :runtime! syntax/syntax.vim -< This can be skipped with the "-u NONE" command line argument. +< Note: This enables filetype detection even if ":filetype off" was + called before now. + This step is skipped if the "-u NONE" command line argument was given. 6. Load the plugin scripts. *load-plugins* This does the same as the command: > diff --git a/runtime/syntax/nosyntax.vim b/runtime/syntax/nosyntax.vim index 0ab3412373..3583cd0bc3 100644 --- a/runtime/syntax/nosyntax.vim +++ b/runtime/syntax/nosyntax.vim @@ -24,6 +24,9 @@ augroup END if exists("syntax_on") unlet syntax_on +else + " only used when starting, to disable the default syntax enable + let syntax_off = 1 endif if exists("syntax_manual") unlet syntax_manual |