Closed arakashic closed 8 years ago
You must specify on_path
attribute.
Because, vim-fugitive checks the path to define the commands(Gstatus
).
NeoBundle 'tpope/vim-fugitive', {'on_cmd' : 'Gstatus', 'on_path' : '.*'}
@Shougo:
Didn't this use to be done as
NeoBundleLazy 'my/gitplugin', {
\ 'autoload' { 'commands': ['list','of','commands']}
\ }
Is the intention of on_cmd
to lazy-load the plugin? Why isn't it used with NeoBundleLazy
? Why isn't it kept in the autoload
dict? Did the format change?
The format is changed. Your example is old style(It works though).
on_cmd
is same with commands
.
NeoBundleLazy
is not needed.
Because, neobundle loads it as lazy automatically.
I am trying to perform lazy loading for tpope/vim-fugitive. Loading by command is not always working. The plugin can be correctly loaded if there is no file opened in vim. The plugin cannot be loaded once a file is opened.
The mininal vimrc for reproducing this problem is
Case 1. In a git managed directory
foo
and runvim
. ThenGstatus
command can correctly trigger the loading of the plugin.Case 2. In a git managed directory
foo
and using vim to edit a file, e.g.vim bar
. ThenGstatus
command cannot load the plugin. The error message isCase 3. In a git managed directory
foo
and runvim
. Then open a filebar
.Gstatus
command cannot load the plugin. Error message is the same as case 2.I am using the latest neobundle and fugitive. Both vim 7.4.622 and neovim 0.1.1 have this problem.
As far as I know, it only happens with fugitive. I have tried other plugins, they all work fine.