X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=vim-sensible%2Finstall.sh;h=6df2de5e09c48a2293ba8a1b4b6c3ca5ba150cec;hb=b1d3b44f966332434d8ec49b2a0df569e9bf8c16;hp=08d2ba5a06b36422ddc189d692498961e7bf3235;hpb=eeaa8db394e92b53b0031fa62b33b969366a7913;p=webi-installers%2F.git diff --git a/vim-sensible/install.sh b/vim-sensible/install.sh index 08d2ba5..6df2de5 100644 --- a/vim-sensible/install.sh +++ b/vim-sensible/install.sh @@ -1,17 +1,19 @@ #!/bin/bash -# title: vim-sensible -# homepage: https://github.com/tpope/vim-sensible -# tagline: | -# Vim Sensible: sensible defaults for vim -# description: | -# Think of sensible.vim as one step above 'nocompatible' mode: a universal set of defaults that (hopefully) everyone can agree on. -# examples: | -# -# Installs to `$HOME/.vim/pack/plugins/start`. -# It just works. -# +function __init_vim_sensible() { + set -e + set -u -mkdir -p $HOME/.vim/pack/plugins/start -rm -rf $HOME/.vim/pack/plugins/start/sensible -git clone --depth=1 https://tpope.io/vim/sensible.git $HOME/.vim/pack/plugins/start/sensible + mkdir -p "$HOME/.vim/pack/plugins/start" + rm -rf "$HOME/.vim/pack/plugins/start/sensible" "$HOME/.vim/pack/plugins/start/vim-sensible" + + # Note: we've had resolution issues in the past, and it doesn't seem likely + # that tpope will switch from using GitHub as the primary host, so we + # skip the redirect and use GitHub directly. + # Open to changing this back in the future. + #my_sensible_repo="https://tpope.io/vim/sensible.git" + my_sensible_repo="https://github.com/tpope/vim-sensible.git" + git clone --depth=1 "${my_sensible_repo}" "$HOME/.vim/pack/plugins/start/vim-sensible" +} + +__init_vim_sensible