diff options
| author | Benjamin Linskey | 2026-05-26 22:58:10 -0400 |
|---|---|---|
| committer | Benjamin Linskey | 2026-05-26 22:58:10 -0400 |
| commit | 3c3243d3465e60e29ce6bfeb78cd15addffc24ca (patch) | |
| tree | ca5ccf7a11a54fd74bf721a9cfa26c42c9e90c01 | |
| parent | 6e531c85516de15c6dd4f3d38ab921fc3d5ac727 (diff) | |
| download | dotfiles-3c3243d3465e60e29ce6bfeb78cd15addffc24ca.tar.gz | |
Install Vim plugins in ~/.vim-plugins
This clones the plugins outside of ~/.vim and symlinks them into place, keeping them out of this repository and allowing us to clone their full history while avoiding the complexity of Git subtrees.
| -rw-r--r-- | .gitignore | 1 | ||||
| -rwxr-xr-x | install.sh | 21 |
2 files changed, 22 insertions, 0 deletions
@@ -1 +1,2 @@ .vim/.netrwhist +.vim/pack @@ -1,5 +1,21 @@ #!/bin/sh +readonly VIM_REPOS="$HOME/.vim-plugins" +readonly VIM_PLUGS="$HOME/.vim/pack/plugins/start" + +# Clones a Git repository into $VIM_REPOS if the repository does not already +# exist there. Takes a single argument, the repository URL. +clone_plugin() { + path="${VIM_REPOS}/$(basename "$1")" + + if [ -d "$path" ]; then + return + fi + + git clone "$1" "$path" + ln -s "$path" "$VIM_PLUGS" +} + rm -f "$HOME"/.bash_profile find "$PWD" -maxdepth 1 -name '.*' -not -name .git -not -name .DS_Store \ @@ -8,5 +24,10 @@ find "$PWD" -maxdepth 1 -name '.*' -not -name .git -not -name .DS_Store \ if [ "$(uname)" = Linux ]; then ln -sf "$HOME"/.profile "$HOME"/.bash_profile; fi if [ "$(uname)" = Linux ]; then ln -sf "$HOME"/.shrc "$HOME"/.bashrc; fi +mkdir -p "$VIM_REPOS" "$VIM_PLUGS" +clone_plugin https://git.linskey.org/ale/ +clone_plugin https://git.linskey.org/ctrlp.vim/ +clone_plugin https://git.linskey.org/iceberg.vim/ + # Regenerate Vim help tags. if type vim >/dev/null 2>&1; then vim -e -s -u NONE -c 'helptags ALL' -c q; fi |