X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=vim%2Finstall.pl;h=9ea3c090c1622846de6ba09db3c038aca761c85f;hb=fa4719922ca4877858157963f406303ce5feda10;hp=af0589c6f73644ca4cbb628010e2631354c0353c;hpb=14eb267f62a9dd7adbbe6d6413060e4cf9eeea47;p=dotfiles.git diff --git a/vim/install.pl b/vim/install.pl index af0589c..9ea3c09 100755 --- a/vim/install.pl +++ b/vim/install.pl @@ -1,11 +1,27 @@ #!/usr/bin/perl -w +my $vim_git = $ENV{'PWD'}; +my $vim_dir = "$ENV{'HOME'}/.vim"; +my $vim_rc = "$ENV{'HOME'}/.vimrc"; + +## test if vim and vimrc exist +die "~/.vim or ~/.vimrc exists!!, backup them first\n" if -e $vim_dir or -e $vim_rc ; + + +## add new files +print `ln -s $vim_git $vim_dir`; +print `ln -s $vim_dir/vimrc $vim_rc`; + +## 1. git clone package manager Vundle my $vundle_url = "https://github.com/gmarik/Vundle.vim.git"; - -system "cd bundle"; + +chdir "bundle"; system "git clone " . $vundle_url; -system "ls -l"; -system "cd .."; +## +## then start vim, and run :BundleInstall to install other packagesj +# +# +# 3. install YouCompleteMe +# ./install.py --clang-completer -#vim --cmd 'echo "aaaa"';