amix / vimrc

The ultimate Vim configuration (vimrc)
MIT License
30.77k stars 7.3k forks source link

Use cache for sources_non_forked #718

Closed elliotwutingfeng closed 1 year ago

elliotwutingfeng commented 2 years ago

Changes

  1. plugins_config.vim checks for existence of sources_non_forked_cache folder before running call pathogen#infect(s:vim_runtime.'/sources_non_forked_cache/{}'). If sources_non_forked_cache does not exist, it will copy contents of sources_non_forked to sources_non_forked_cache.
  2. update_plugins.py copies contents of sources_non_forked folder to sources_non_forked_cache folder (gitignored) if sources_non_forked_cache does not exist yet. Afterwards, it updates the contents of sources_non_forked_cache from the web. If the update fails, user would at least have contents of sources_non_forked in sources_non_forked_cache.

README.md has been updated accordingly.

Benefits

Possible issues

Is there an OS-portable equivalent for call system("cp -r " . s:vim_runtime.'/sources_non_forked' . " " . s:vim_runtime.'/sources_non_forked_cache')? It works on *nix/PowerShell/Git-For-Windows but not Windows CMD.

amix commented 1 year ago

I find this too risky to include, especially as I can't easily test this on a Windows machine.