install.fairie/home/.chezmoiscripts/universal/run_onchange_after_39-vim-plugins.sh.tmpl

21 lines
916 B
Cheetah
Raw Normal View History

2023-06-04 18:35:17 -07:00
{{- if ne .host.distro.family "windows" -}}
#!/usr/bin/env bash
# @file VIM Plugin Pre-Install
# @brief Pre-installs the VIM plugins from their git sources
# @description
# This script pre-installs the VIM plugins defined in [`.chezmoidata.yaml`](https://github.com/megabyte-labs/install.doctor/tree/master/home/.chezmoidata.yaml)
# so that VIM does not have to do anything on its first launch.
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
2023-07-11 21:32:13 -07:00
function vimSetup() {
### Run the VIM plugin install routine
if command -v vim > /dev/null; then
2023-11-29 22:13:23 -08:00
logg info 'Running vim +PlugInstall +qall' && vim +'PlugInstall --sync' +qall &> /dev/null || logg error 'Failed to run vim +PlugInstall +qall +silent'
logg info 'Running vim +CocUpdateSync +qall' && vim +CocUpdateSync +qall || logg error 'Failed to run vim +CocUpdateSync +qall'
2023-07-11 21:32:13 -07:00
fi
}
vimSetup
2023-06-04 18:35:17 -07:00
{{ end -}}