Load a script file after loaded a plugin
- Dominant language
- Vim Script
- Stars
- 35.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I wrote config script files for each plugin and I loaded these scripts all after `call plug#end()`, but sometimes a plugin would not be loaded in the whole editing time, so it's not necessary to load this plugin's config script.
So, now, I want to load a plugin's config script after this plugin load rather than load all plugin's scripts, what I do now is liking below:
```vim
call plut#begin...
Plug "plug_a"
...
Plug "plug_b", {'on': 'start_b'}
for [plug_name, spec] in items(g:plugs):
execute ‘autocmd! User ' . plug_name ' source ' . '/path/to/config/of/custom_plug_script.vim'
endfor
call plug#end()
```
there's a problem, no script is loaded, no matter `plug_a` without condition `on` and `for` or `plug_b` with `on` and `for`, no custom script about them are loaded.
------------------------------
```
```
- Type:
- [ ] Bug
- [ ] Enhancement
- [ ] Feature Request
- [X] Question
- OS:
- [ ] All/Other
- [x] Linux
- [ ] OS X
- [ ] Windows
- Vim:
- [ ] Terminal Vim
- [ ] GVim
- [X] Neovim
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.