dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit e53969ad06f17cc77944c66f2bb4741d925b5f0d
parent d5b364b7a3e3f6c38933d375dbe3e0cf74a00c79
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri, 19 Jan 2018 08:15:00 -0500

my-init: Add Vim packages detection

Diffstat:
M.local/bin/my-init | 16+++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/.local/bin/my-init b/.local/bin/my-init @@ -24,6 +24,19 @@ __clone() echo "Succeeded" } +__optclone_pathogen() +{ + vim --cmd "redir! > /tmp/djmoch-vimpackages | silent echo has('packages') | q" + case `cat /tmp/djmoch-vimpackages` in + *0*) + echo -n " Cloning tpope/vim-pathogen ... " + git clone https://github.com/tpope/vim-pathogen.git + [ $? -ne 0 ] && echo "FAILED!" && return 1 + echo "Succeeded" + ;; + esac +} + echo "Performing run-once initializations" if [ -n "$1" -a "$1" = "-f" ] @@ -86,6 +99,7 @@ then __clone beloglazov/vim-online-thesaurus __clone jszakmeister/vim-togglecursor __clone chr4/sslsecure.vim + __optclone_pathogen cd - > /dev/null 2>&1 # Plugins used optionally @@ -101,4 +115,4 @@ then chmod 000 "$HOME/._.djmoch" fi -unset __clone __has +unset __clone __has __optclone_pathogen