Open coolaj86 opened 3 years ago
shfmt
curl -sS https://webinstall.dev/shfmt | bash
vim-shfmt
mkdir -p ~/.vim/pack/plugins/start/ git clone --depth=1 https://github.com/z0mbix/vim-shfmt.git ~/.vim/pack/plugins/start/shfmt
~/vim/plugins/shfmt.vim let g:shfmt_extra_args = '-i 4 -sr -s' let g:shfmt_fmt_on_save = 1
~/.vimrc
" Shfmt: TODO add to Webi source ~/.vim/plugins/shfmt.vim
Now if I run :Shfmt I can see that it indents, but it's not indenting on save.
:Shfmt
What have I misunderstood or done wrong?
Are your settings actually in ~/vim/plugins/shfmt.vim or was that a typo?
~/vim/plugins/shfmt.vim
also, is the file you’re editing detected as a shell script (filetype sh)?
shfmt
:vim-shfmt
in the vim 8 plugin style:~/.vimrc
:Now if I run
:Shfmt
I can see that it indents, but it's not indenting on save.What have I misunderstood or done wrong?