Fix vim breakage. Detect ~/.vim/vimrc as well

This commit is contained in:
Roey Darwish Dror
2018-06-07 09:21:44 +03:00
parent c490b2c108
commit 6cceb58139
2 changed files with 21 additions and 3 deletions

View File

@@ -115,9 +115,8 @@ fn main() -> Result<(), Error> {
}
}
if let Ok(vim) = which("Vim") {
let vimrc = home_path(".vimrc");
if vimrc.exists() {
if let Ok(vim) = which("vim") {
if let Some(vimrc) = vim::vimrc() {
if let Some(plugin_framework) = vim::PluginFramework::detect(&vimrc) {
terminal.print_separator(&format!("vim ({:?})", plugin_framework));
run_vim(&vim, &vimrc, plugin_framework.upgrade_command())