X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=vim-sensible%2Finstall.sh;h=6df2de5e09c48a2293ba8a1b4b6c3ca5ba150cec;hb=91512157ab426c87e0a82b594620e90e324b23a3;hp=e19a75bd7748d4c63a74c615342773f3cc96412f;hpb=5e0debf4c54c1e55476c1bc533c26db2b54d2f77;p=webi-installers%2F.git diff --git a/vim-sensible/install.sh b/vim-sensible/install.sh index e19a75b..6df2de5 100644 --- a/vim-sensible/install.sh +++ b/vim-sensible/install.sh @@ -1,13 +1,19 @@ #!/bin/bash -# title: vim-sensible -# homepage: https://github.com/tpope/vim-sensible -# tagline: 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: | -# N/A - -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 +function __init_vim_sensible() { + set -e + set -u + + 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