diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-02-13 17:06:33 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-02-14 15:20:32 -0500 |
commit | da6299445a0fd52be5af2d7ea9ee539f12c20a73 (patch) | |
tree | 2935a0f08209e9cc1fad74a6bd921c21fcdb5de2 | |
parent | 9c2c24ec484ececc1869dafa973566f685418757 (diff) | |
download | rneovim-da6299445a0fd52be5af2d7ea9ee539f12c20a73.tar.gz rneovim-da6299445a0fd52be5af2d7ea9ee539f12c20a73.tar.bz2 rneovim-da6299445a0fd52be5af2d7ea9ee539f12c20a73.zip |
ex_docmd: rename force_enable_filetype().
It is no longer forcing anything.
-rw-r--r-- | runtime/doc/starting.txt | 23 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/nvim/main.c | 2 |
3 files changed, 14 insertions, 13 deletions
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 900ec593bd..ed3f379275 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -315,10 +315,10 @@ argument. When {vimrc} is equal to "NONE" (all uppercase), all initializations from files and environment variables are skipped, including reading the |ginit.vim| file when the GUI - starts. Loading plugins and enabling syntax highlighting are - also skipped. + starts. Plugins and syntax highlighting are also skipped. When {vimrc} is equal to "NORC" (all uppercase), this has the - same effect as "NONE", but loading plugins is not skipped. + same effect as "NONE", but plugins and syntax highlighting are + not skipped. *-i* -i {shada} The file {shada} is used instead of the default ShaDa @@ -392,8 +392,8 @@ accordingly. Vim proceeds in this order: All following initializations until 4. are skipped. $MYVIMRC is not set. "vim -u NORC" can be used to skip these initializations without - reading a file. "vim -u NONE" also skips loading plugins and enabling - syntax highlighting. |-u| + reading a file. "vim -u NONE" also skips plugins and syntax + highlighting. |-u| If Vim was started in Ex mode with the "-s" argument, all following initializations until 4. are skipped. Only the "-u" option is @@ -426,16 +426,17 @@ accordingly. Vim proceeds in this order: - The file ".exrc" (for Unix) "_exrc" (for Win32) -4. 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. - -5. Enable filetype and indent plugins. +4. Enable filetype and indent plugins. This does the same as the commands: > :runtime! filetype.vim :runtime! ftplugin.vim :runtime! indent.vim +< This step is skipped if ":filetype ..." was called before now or if + the "-u NONE" command line argument was given. + +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. 6. Load the plugin scripts. *load-plugins* diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 7655659107..f4e2667c1f 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -9301,7 +9301,7 @@ static void ex_filetype(exarg_T *eap) /// Do ":filetype plugin indent on" if user did not already do some /// permutation thereof. -void force_enable_filetype(void) +void maybe_enable_filetype(void) { if (!filetype_detect && !filetype_plugin && !filetype_indent) { source_runtime((char_u *)FILETYPE_FILE, true); diff --git a/src/nvim/main.c b/src/nvim/main.c index 6f5d40645a..a5515a30f1 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -335,7 +335,7 @@ 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". - force_enable_filetype(); + maybe_enable_filetype(); // Enable syntax (sources syntax/syntax.vim, which calls `:filetype on`). syn_cmd("syntax"); } |