feature(vim-shfmt): add shellcheck, add vim-shfmt to vim-essentials

This commit is contained in:
AJ ONeal
2021-12-05 05:01:38 +00:00
parent bfb7b97f10
commit fb0340b392
4 changed files with 17 additions and 1 deletions
+1
View File
@@ -23,6 +23,7 @@ It includes many of the vim plugins available on webinstall.dev such as:
- [vim-viminfo](/vim-viminfo)
- [vim-lastplace](/vim-lastplace)
- [vim-spell](/vim-spell)
- [vim-shfmt](/vim-shfmt)
- [vim-ale](/vim-ale)
- [vim-prettier](/vim-prettier)
- [vim-whitespace](/vim-whitespace)
+1
View File
@@ -9,6 +9,7 @@ function __init_vim_essentials() {
vim-lastplace \
vim-spell \
vim-ale \
vim-shfmt \
vim-prettier \
vim-whitespace
# done
+11
View File
@@ -22,6 +22,17 @@ let g:shfmt_extra_args = '-i 4 -sr -ci -s'
let g:shfmt_fmt_on_save = 1
```
### Files
```txt
~/.config/envman/PATH.env
~/.vimrc
~/.vim/pack/plugins/start/shfmt
~/.vim/plugins/shfmt.vim
~/.local/bin/shfmt
~/.local/bin/shellcheck
```
### How to install and configure manually
1. Clone `vim-shfmt` into your `~/.vim/pack/plugins/start`:
+4 -1
View File
@@ -8,10 +8,13 @@ function __init_vim_shfmt() {
rm -rf "$HOME/.vim/pack/plugins/start/vim-shfmt"
git clone --depth=1 https://github.com/z0mbix/vim-shfmt.git "$HOME/.vim/pack/plugins/start/vim-shfmt"
export PATH="$HOME/.local/bin:${PATH}"
if [ -z "$(command -v shfmt)" ]; then
export PATH="$HOME/.local/bin:${PATH}"
webi shfmt
fi
if [ -z "$(command -v shellcheck)" ]; then
webi shellcheck
fi
if [ ! -f "$HOME/.vimrc" ]; then
touch "$HOME/.vimrc"