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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user