rplugin: Initialize remote plugins lazily. #4384

This commit is contained in:
Shougo Matsushita
2016-03-02 05:06:36 +09:00
committed by Justin M. Keyes
parent e7485ab1c9
commit bb020df0f5
3 changed files with 61 additions and 42 deletions

View File

@@ -1,5 +1,16 @@
if exists('g:loaded_remote_plugins') || &cp
if exists('g:loaded_remote_plugins')
finish
endif
let g:loaded_remote_plugins = 1
call remote#host#LoadRemotePlugins()
command! UpdateRemotePlugins call remote#host#UpdateRemotePlugins()
augroup nvim-rplugin
autocmd!
autocmd FuncUndefined *
\ call remote#host#LoadRemotePluginsEvent(
\ 'FuncUndefined', expand('<amatch>'))
autocmd CmdUndefined *
\ call remote#host#LoadRemotePluginsEvent(
\ 'CmdUndefined', expand('<amatch>'))
augroup END