These are chat archives for Shougo/dein.vim

May 2017
Zhaosheng Pan
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/
if dein#load_state($HOME . '/.cache/dein')
  call dein#begin($HOME . '/.vim/dein')
  call dein#add($HOME . '/.vim/dein/repos/')
  call dein#end()
  call dein#save_state()

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.

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
dein#recache_runtimepath() is cache update.
dein#update() is repos and cache update.
Zhaosheng Pan
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.
May 29 2017 10:19
Zhaosheng Pan
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?