Skip to content

Commit

Permalink
Merge pull request #16 from sasaplus1/use-dein-state
Browse files Browse the repository at this point in the history
use dein state
  • Loading branch information
sasaplus1 authored Dec 26, 2024
2 parents 1feac6f + 4fdca06 commit c7090ab
Show file tree
Hide file tree
Showing 17 changed files with 459 additions and 419 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
Loading

0 comments on commit c7090ab

Please sign in to comment.