aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Linskey2026-05-26 22:58:10 -0400
committerBenjamin Linskey2026-05-26 22:58:10 -0400
commit3c3243d3465e60e29ce6bfeb78cd15addffc24ca (patch)
treeca5ccf7a11a54fd74bf721a9cfa26c42c9e90c01
parent6e531c85516de15c6dd4f3d38ab921fc3d5ac727 (diff)
downloaddotfiles-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--.gitignore1
-rwxr-xr-xinstall.sh21
2 files changed, 22 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index fdbef3b..bd4fbd7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
.vim/.netrwhist
+.vim/pack
diff --git a/install.sh b/install.sh
index 31b1d10..77825b5 100755
--- a/install.sh
+++ b/install.sh
@@ -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