diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2022-01-18 12:46:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 12:46:41 -0700 |
commit | de6f9233eee937139f607d3a59fd5b1f479d8a13 (patch) | |
tree | bd63fb4dd40f7bfc81fc6738b1d1394cd84ecc27 /runtime/doc/vim_diff.txt | |
parent | fcf5dd34fdfde3a6632b96a88f66c1053cba08d1 (diff) | |
download | rneovim-de6f9233eee937139f607d3a59fd5b1f479d8a13.tar.gz rneovim-de6f9233eee937139f607d3a59fd5b1f479d8a13.tar.bz2 rneovim-de6f9233eee937139f607d3a59fd5b1f479d8a13.zip |
refactor: source ftplugin.vim separately from filetype.vim (#17129)
This is a follow-on to #17040. The real benefit of #17040 was ensuring
that the ftplugin FileType autocommand was defined first and thus always
fired first. A side effect of the implementation in #17040 was that
setting variables that modified the state of filetype detection (such as
g:did_load_filetypes or g:do_filetype_lua) could no longer be set in the
user's init file. Filetype detection can also no longer be prevented
from loading by using `:filetype off`.
This PR addresses both of those side effects by unconditionally sourcing
ftplugin.vim and indent.vim before the user's init file (which ensures
that these autocommands run first) and sourcing filetype.vim *after* the
user's init file (thus allowing it to be blocked or modified).
Diffstat (limited to 'runtime/doc/vim_diff.txt')
-rw-r--r-- | runtime/doc/vim_diff.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 32a97779e0..7e61eac404 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -23,12 +23,10 @@ centralized reference of the differences. ============================================================================== 2. Defaults *nvim-defaults* -- ":filetype plugin indent on" is enabled by default. This runs before - init.vim is sourced so that FileType autocommands in init.vim run after - those in filetype.vim. -- Syntax highlighting is enabled by default. This runs after init.vim is - sourced so that users can optionally disable syntax highlighting with - ":syntax off". +- Filetype detection is enabled by default. This can be disabled by adding + ":filetype off" to |init.vim|. +- Syntax highlighting is enabled by default. This can be disabled by adding + ":syntax off" to |init.vim|. - 'autoindent' is enabled - 'autoread' is enabled |