diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | vim/ftplugin/sh.vim | 1 |
2 files changed, 5 insertions, 1 deletions
@@ -119,7 +119,10 @@ versions : updates : $(GIT) submodule foreach -q 'if [ $$path == "vim/pack/filetype/start/perl" ]; then if [ $$(git rev-parse dev) != $$sha1 ]; then git lg dev...$$sha1; fi; else if [ $$(git rev-parse master) != $$sha1 ]; then git lg master...$$sha1; fi; fi' -.PHONY: submodules build install clean update versions updates +shfmt : + rg --files-without-match shfmt:skip $$(rg --files-with-matches '[#]!.*sh\b|[v]im:.*ft=.*sh\b') | grep -v "$$(echo $$(git submodule foreach -q 'echo $$sm_path') | sed 's/ /\\|/g')" | xargs shfmt -w -i 4 + +.PHONY: submodules build install clean update versions updates shfmt # installation targets diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim index 004cd12..728eb70 100644 --- a/vim/ftplugin/sh.vim +++ b/vim/ftplugin/sh.vim @@ -1,3 +1,4 @@ let b:is_bash = 1 let b:ale_fixers = { 'sh': ['shfmt'] } let b:ale_fix_on_save = 1 +let b:ale_sh_shfmt_options = '-i 4' |