1
0
forked from aniani/vim

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

@@ -120,3 +120,24 @@ func WaitFor(expr)
sleep 10m
endfor
endfunc
" Run Vim, using the "vimcmd" file and "-u NORC".
" "before" is a list of commands to be executed before loading plugins.
" "after" is a list of commands to be executed after loading plugins.
" Plugins are not loaded, unless 'loadplugins' is set in "before".
" Return 1 if Vim could be executed.
func RunVim(before, after)
if !filereadable('vimcmd')
return 0
endif
call writefile(a:before, 'Xbefore.vim')
call writefile(a:after, 'Xafter.vim')
let cmd = readfile('vimcmd')[0]
let cmd = substitute(cmd, '-u \f\+', '-u NONE', '')
exe "silent !" . cmd . " --cmd 'so Xbefore.vim' -S Xafter.vim"
call delete('Xbefore.vim')
call delete('Xafter.vim')
return 1
endfunc