From be01ceb18cf43be5ec2f681421c55bfa70357823 Mon Sep 17 00:00:00 2001 From: Vasili Sviridov Date: Tue, 23 Feb 2016 14:01:14 -0800 Subject: [PATCH] setting up proper handling for plug on windows --- vimrc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vimrc b/vimrc index 0ad52e8..19a333d 100644 --- a/vimrc +++ b/vimrc @@ -1,13 +1,15 @@ -set shell=/bin/bash +"set shell=/bin/sh scriptencoding utf-8 set encoding=utf-8 set shortmess=I "turn off splash screen -let have_plug=filereadable(expand('~/.vim/autoload/plug.vim')) +let vim_files=fnamemodify(expand("$MYVIMRC"), ":p:h") +let plug_path=expand(vim_files . '/autoload/plug.vim') +let have_plug=filereadable(plug_path) if(!have_plug && executable('curl')) echo "Installing Plug" - !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + echo '!curl -fLo ' . plug_path . ' --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' endif if(have_plug)