vim: add plugins, tmux: status bar, fix Ctrl+A clash
- Add vim-gitgutter, vim-commentary, vim-surround via install script - Rebind git log widget from Ctrl+A to Ctrl+T (tmux prefix clash) - Add date, time, and battery indicator to tmux status bar - Set tmux clock colour to teal Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
27
install.d/25-vim.sh
Executable file
27
install.d/25-vim.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Description:
|
||||
# Install vim plugins using native vim packages (pack/).
|
||||
#
|
||||
|
||||
vim_pack_dir="$HOME/.vim/pack/plugins/start"
|
||||
mkdir -p "$HOME/.vim/pack/plugins/start"
|
||||
|
||||
vim_plugins=(
|
||||
"https://github.com/airblade/vim-gitgutter.git"
|
||||
"https://github.com/tpope/vim-commentary.git"
|
||||
"https://github.com/tpope/vim-surround.git"
|
||||
)
|
||||
|
||||
for url in "${vim_plugins[@]}"; do
|
||||
name=$(basename "$url" .git)
|
||||
dest="$vim_pack_dir/$name"
|
||||
if [[ -d "$dest" ]]; then
|
||||
git -C "$dest" pull --quiet
|
||||
log_pass "$name updated"
|
||||
else
|
||||
git clone --depth 1 --quiet "$url" "$dest"
|
||||
log_pass "$name installed"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user