Shougo / dein.vim

:zap: Dark powered Vim/Neovim plugin manager
MIT License
3.43k stars 196 forks source link

Can't call hook post_source when vim starting at after auto_recache #426

Closed kuuote closed 3 years ago

kuuote commented 3 years ago

Problems summary

Can't call hook post_source when vim starting at after auto_recache

Expected

Can call post_source always.

Environment Information (Required!)

Provide a minimal .vimrc with less than 50 lines (Required!)

Place these files to ~/.vim

vimrc:

set runtimepath^=/data/vim/repos/github.com/Shougo/dein.vim/
let g:dein#auto_recache = 1
if dein#load_state($HOME .. '/.vim/dein')
  call dein#begin($HOME .. '/.vim/dein')
  call dein#load_toml($HOME .. '/.vim/a.toml')
  call dein#end()
  call dein#save_state()
endif
autocmd VimEnter * call dein#call_hook('post_source')

a.toml:

[[plugins]]
repo = 'Shougo/dein.vim'
hook_post_source = '''
echo 'hoge'
'''

The reproduce ways from Vim starting (Required!)

  1. :call dein#install()
  2. Quit vim and restart(for auto_recache) Note: can call hook_post_source properly at this stage.
  3. Restart vim again.
  4. hoge was not shown.