These are chat archives for Shougo/dein.vim

29th
May 2017
Zhaosheng Pan
@brglng
May 29 2017 10:10

OK. I have solved hook problem by using String for hook_post_update. But there seems another problem that dein#clear_state() does not delete the state file when g:dein#cache_directory is set. Here is my minimal configuration:

let g:dein#install_process_timeout = 3600
let g:dein#cache_directory = $HOME . '/.cache/dein'
set runtimepath+=$HOME/.vim/dein/repos/github.com/Shougo/dein.vim
if dein#load_state($HOME . '/.cache/dein')
  call dein#begin($HOME . '/.vim/dein')
  call dein#add($HOME . '/.vim/dein/repos/github.com/Shougo/dein.vim')
  ...
  call dein#end()
  call dein#save_state()
endif

Hi Shougo, if I have set g:dein#cache_directory to a machine specific path such as ~/.cache/dein and use a symlink to a directory in my Dropbox for ~/.vim, does that mean if I have updated the plugins on one machine, it won't be updated on another machine (because the cache is not updated and only the repos are synced and updated)? My configuration is still like above. Thanks.

Shougo
@Shougo
May 29 2017 10:13
If ~/.cache/dein is Dropbox directory, it will be updated.
But it seems ~/.vim/dein only Dropbox directory.
You must execute dein#recache_runtimepath().
because the cache is not updated and only the repos are synced and updated
Yes.
dein#recache_runtimepath() is cache update.
dein#update() is repos and cache update.
Zhaosheng Pan
@brglng
May 29 2017 10:19
OK. I think it is not possible for me to use a Dropbox directory for ~/.cache/dein because the cache_*.vim and state_*.vim files records absolute paths for the the runtimepaths, but the paths are different on my several machines (differens OS). Maybe I have to execute dein#recache_runtimepath() on my every machines after I update the plugins.
Shougo
@Shougo
May 29 2017 10:19
Yes
Zhaosheng Pan
@brglng
May 29 2017 10:30
Is it possible to record the repo revisions in dein's cache, so that I can write a function to compare the revisions in the cache and in the repo, and call dein#recach_runtimepath() automatically if there is difference?