From d655bbb3bbe46cec77c04e2354ddaa8875f5aa29 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 15 Nov 2020 11:42:58 +0100 Subject: vim plugin management --- bash/vim-plugins.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 bash/vim-plugins.bash (limited to 'bash') diff --git a/bash/vim-plugins.bash b/bash/vim-plugins.bash new file mode 100644 index 0000000..f987531 --- /dev/null +++ b/bash/vim-plugins.bash @@ -0,0 +1,21 @@ +function vim-add() { + source ~/.files + + local NAME=$(basename "$1") + + [ -d "$DOTFILEBASE/.vim/bundle/$NAME" ] || return 1 # no such plugin + + local OLD_PWD=$(pwd) + cd "$DOTFILEBASE/.vim/bundle-active/" + [ -L $NAME ] && cd "$OLD_PWD" && return 2 # Already exists + + ln -s "../bundle/$NAME" + + cd "$OLD_PWD" +} + +function vim-remove { + source ~/.files + + local NAME=$(basename "$1") +} -- cgit v1.2.3