aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Overbruck <overbruck@mir.de>2014-10-06 12:18:53 +0200
committerDuncan Overbruck <overbruck@mir.de>2014-10-06 12:18:53 +0200
commit68ce42ae25cbc7b8ee77ed45f7b944c8c632d076 (patch)
tree1b32351b550e48174457bfcb81bb62b00b39ffea
parent3a41794decfe269e0f22595fca90d6966780b392 (diff)
downloaddotfiles-68ce42ae25cbc7b8ee77ed45f7b944c8c632d076.tar.gz
updated vim install script
-rwxr-xr-xinstall-vim14
1 files changed, 7 insertions, 7 deletions
diff --git a/install-vim b/install-vim
index d706832..1186374 100755
--- a/install-vim
+++ b/install-vim
@@ -3,15 +3,15 @@
cd $(dirname $BASH_SOURCE)
BASE=$(pwd)
VIM_RC=~/.vimrc
+VIM_DIR=~/.vim
-# move vimrc to vimrc.old
-if [ -f "$VIM_RC" ]; then
- mv -v ~/.vimrc ~/.vimrc.old 2> /dev/null
-fi
+cp -v "$VIM_RC" "$VIM_RC".old
+rm -v "$VIM_RC"
+ln -sf $BASE/vimrc "$VIM_RC"
-# link vimrc to repository
-ln -sf $BASE/vimrc ~/.vimrc
+cp -v -r "$VIM_DIR" "$VIM_DIR".old
+rm -v "$VIM_DIR"
+ln -sf $BASE/vim "$VIM_DIR"
# install plugins
vim +PlugInstall +qall
-