patch 7.4.2164

Problem:    It is not possible to use plugins in an "after" directory to tune
            the behavior of a package.
Solution:   First load plugins from non-after directories, then packages and
            finally plugins in after directories.
            Reset 'loadplugins' before executing --cmd arguments.
This commit is contained in:
Bram Moolenaar
2016-08-06 19:01:55 +02:00
parent d76a0c15f8
commit 66459b7c98
9 changed files with 120 additions and 10 deletions

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.4. Last change: 2016 Jul 29
*starting.txt* For Vim version 7.4. Last change: 2016 Aug 06
VIM REFERENCE MANUAL by Bram Moolenaar
@ -858,6 +858,8 @@ accordingly. Vim proceeds in this order:
searched for the "plugin" sub-directory and all files ending in ".vim"
will be sourced (in alphabetical order per directory), also in
subdirectories.
However, directories in 'runtimepath' ending in "after" are skipped
here and only loaded after packages, see below.
Loading plugins won't be done when:
- The 'loadplugins' option was reset in a vimrc file.
- The |--noplugin| command line argument is used.
@ -865,13 +867,18 @@ accordingly. Vim proceeds in this order:
- When Vim was compiled without the |+eval| feature.
Note that using "-c 'set noloadplugins'" doesn't work, because the
commands from the command line have not been executed yet. You can
use "--cmd 'set noloadplugins'" |--cmd|.
use "--cmd 'set noloadplugins'" or "--cmd 'set loadplugins'" |--cmd|.
Packages are loaded. These are plugins, as above, but found in the
"start" directory of each entry in 'packpath'. Every plugin directory
found is added in 'runtimepath' and then the plugins are sourced. See
|packages|.
The plugins scripts are loaded, as above, but now only the directories
ending in "after" are used. Note that 'runtimepath' will have changed
if packages have been found, but that should not add a directory
ending in "after".
5. Set 'shellpipe' and 'shellredir'
The 'shellpipe' and 'shellredir' options are set according to the
value of the 'shell' option, unless they have been set before.