Add --no-vim flag (#98)

Just like we have the `--no-emacs` flag, it would be nice to have the `--no-vim` flag, to avoid the upgrade of the vim/neovim configuration files and packages.
This commit is contained in:
Adam Papai
2018-12-09 16:58:13 +09:00
committed by Roey Darwish Dror
parent 0500080e40
commit 4c1d26e120
3 changed files with 15 additions and 4 deletions

View File

@@ -179,8 +179,10 @@ fn run() -> Result<(), Error> {
git_repos.insert(base_dirs.home_dir().join(".emacs.d"));
}
git_repos.insert(base_dirs.home_dir().join(".vim"));
git_repos.insert(base_dirs.home_dir().join(".config/nvim"));
if !opt.no_vim {
git_repos.insert(base_dirs.home_dir().join(".vim"));
git_repos.insert(base_dirs.home_dir().join(".config/nvim"));
}
#[cfg(unix)]
{
@@ -227,8 +229,12 @@ fn run() -> Result<(), Error> {
report.push_result(execute(|| generic::run_vcpkg_update(opt.dry_run), opt.no_retry)?);
report.push_result(execute(|| generic::run_pipx_update(opt.dry_run), opt.no_retry)?);
report.push_result(execute(|| generic::run_jetpack(opt.dry_run), opt.no_retry)?);
report.push_result(execute(|| vim::upgrade_vim(&base_dirs, opt.dry_run), opt.no_retry)?);
report.push_result(execute(|| vim::upgrade_neovim(&base_dirs, opt.dry_run), opt.no_retry)?);
if !opt.no_vim {
report.push_result(execute(|| vim::upgrade_vim(&base_dirs, opt.dry_run), opt.no_retry)?);
report.push_result(execute(|| vim::upgrade_neovim(&base_dirs, opt.dry_run), opt.no_retry)?);
}
report.push_result(execute(
|| node::run_npm_upgrade(&base_dirs, opt.dry_run),
opt.no_retry,