mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +00:00
ex_docmd: rename force_enable_filetype().
It is no longer forcing anything.
This commit is contained in:
@@ -315,10 +315,10 @@ argument.
|
|||||||
When {vimrc} is equal to "NONE" (all uppercase), all
|
When {vimrc} is equal to "NONE" (all uppercase), all
|
||||||
initializations from files and environment variables are
|
initializations from files and environment variables are
|
||||||
skipped, including reading the |ginit.vim| file when the GUI
|
skipped, including reading the |ginit.vim| file when the GUI
|
||||||
starts. Loading plugins and enabling syntax highlighting are
|
starts. Plugins and syntax highlighting are also skipped.
|
||||||
also skipped.
|
|
||||||
When {vimrc} is equal to "NORC" (all uppercase), this has the
|
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*
|
||||||
-i {shada} The file {shada} is used instead of the default ShaDa
|
-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
|
All following initializations until 4. are skipped. $MYVIMRC is not
|
||||||
set.
|
set.
|
||||||
"vim -u NORC" can be used to skip these initializations without
|
"vim -u NORC" can be used to skip these initializations without
|
||||||
reading a file. "vim -u NONE" also skips loading plugins and enabling
|
reading a file. "vim -u NONE" also skips plugins and syntax
|
||||||
syntax highlighting. |-u|
|
highlighting. |-u|
|
||||||
|
|
||||||
If Vim was started in Ex mode with the "-s" argument, all following
|
If Vim was started in Ex mode with the "-s" argument, all following
|
||||||
initializations until 4. are skipped. Only the "-u" option is
|
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)
|
- The file ".exrc" (for Unix)
|
||||||
"_exrc" (for Win32)
|
"_exrc" (for Win32)
|
||||||
|
|
||||||
4. Enable syntax highlighting.
|
4. Enable filetype and indent plugins.
|
||||||
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.
|
|
||||||
This does the same as the commands: >
|
This does the same as the commands: >
|
||||||
:runtime! filetype.vim
|
:runtime! filetype.vim
|
||||||
:runtime! ftplugin.vim
|
:runtime! ftplugin.vim
|
||||||
:runtime! indent.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.
|
< This can be skipped with the "-u NONE" command line argument.
|
||||||
|
|
||||||
6. Load the plugin scripts. *load-plugins*
|
6. Load the plugin scripts. *load-plugins*
|
||||||
|
@@ -9301,7 +9301,7 @@ static void ex_filetype(exarg_T *eap)
|
|||||||
|
|
||||||
/// Do ":filetype plugin indent on" if user did not already do some
|
/// Do ":filetype plugin indent on" if user did not already do some
|
||||||
/// permutation thereof.
|
/// permutation thereof.
|
||||||
void force_enable_filetype(void)
|
void maybe_enable_filetype(void)
|
||||||
{
|
{
|
||||||
if (!filetype_detect && !filetype_plugin && !filetype_indent) {
|
if (!filetype_detect && !filetype_plugin && !filetype_indent) {
|
||||||
source_runtime((char_u *)FILETYPE_FILE, true);
|
source_runtime((char_u *)FILETYPE_FILE, true);
|
||||||
|
@@ -335,7 +335,7 @@ int main(int argc, char **argv)
|
|||||||
// If using the runtime (-u is not NONE), enable syntax & filetype plugins.
|
// If using the runtime (-u is not NONE), enable syntax & filetype plugins.
|
||||||
if (params.use_vimrc != NULL && strcmp(params.use_vimrc, "NONE") != 0) {
|
if (params.use_vimrc != NULL && strcmp(params.use_vimrc, "NONE") != 0) {
|
||||||
// Do ":filetype plugin indent on".
|
// Do ":filetype plugin indent on".
|
||||||
force_enable_filetype();
|
maybe_enable_filetype();
|
||||||
// Enable syntax (sources syntax/syntax.vim, which calls `:filetype on`).
|
// Enable syntax (sources syntax/syntax.vim, which calls `:filetype on`).
|
||||||
syn_cmd("syntax");
|
syn_cmd("syntax");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user