projects
/
dotfiles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f6e4218
)
vim - improve install.pl
author
Peng Li
<seudut@gmail.com>
Thu, 28 Jan 2016 05:35:38 +0000
(13:35 +0800)
committer
Peng Li
<seudut@gmail.com>
Thu, 28 Jan 2016 05:35:38 +0000
(13:35 +0800)
vim/install.pl
patch
|
blob
|
history
diff --git
a/vim/install.pl
b/vim/install.pl
index
3b7ac32
..
9ea3c09
100755
(executable)
--- a/
vim/install.pl
+++ b/
vim/install.pl
@@
-1,16
+1,27
@@
#!/usr/bin/perl -w
#!/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";
## 1. git clone package manager Vundle
my $vundle_url = "https://github.com/gmarik/Vundle.vim.git";
-
+
chdir "bundle";
system "git clone " . $vundle_url;
chdir "bundle";
system "git clone " . $vundle_url;
-## 2. install packages
+##
+## then start vim, and run :BundleInstall to install other packagesj
#
#
# 3. install YouCompleteMe
# ./install.py --clang-completer
#
#
# 3. install YouCompleteMe
# ./install.py --clang-completer
-
-#vim --cmd 'echo "aaaa"';