Skip to content

Commit

Permalink
use state
Browse files Browse the repository at this point in the history
  • Loading branch information
sasaplus1 committed Dec 26, 2024
1 parent 56032b2 commit 4fdca06
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions vim/plugin-manager.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@ if &runtimepath !~# '/dein.vim'
execute 'set' 'runtimepath^=' . s:dein_dir
endif

" NOTE: hook_sourceに関数を渡しているのでstateが使えない
" NOTE: hooks_fileを駆使するなど別の方法が必要
" if dein#min#load_state(s:plugin_dir)
call dein#begin(s:plugin_dir)
call dein#add(s:dein_dir)
if dein#min#load_state(s:plugin_dir)
call dein#begin(s:plugin_dir)
call dein#add(s:dein_dir)

let plugin_files = split(glob(expand('<script>:h') . '/plugins/*.vim'), '\n')
let plugin_files = split(glob(expand('<script>:h') . '/plugins/*.vim'), '\n')

for plugin_file in plugin_files
execute 'source' plugin_file
endfor
for plugin_file in plugin_files
execute 'source' plugin_file
endfor

call dein#end()
" call dein#save_state()
" endif
call dein#end()
call dein#save_state()
endif

" sourceフックを呼ぶ
call dein#call_hook('source')
Expand Down

0 comments on commit 4fdca06

Please sign in to comment.