From dceea6915aa54cb1e0b69c8c85a20e4b8bd2b85c Mon Sep 17 00:00:00 2001 From: tdro Date: Mon, 14 Dec 2020 21:37:15 -0500 Subject: .vimrc: Add yaml round trip linter --- .vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 5512427..632d9fc 100644 --- a/.vimrc +++ b/.vimrc @@ -100,6 +100,7 @@ endfunction " Ansible Check function! AnsibleCheck() :silent !notify-send -t 10000 "$(ansible-playbook --syntax-check % 2>&1)" > /dev/null 2>&1 & + :redraw! endfunction " Shell Check @@ -302,7 +303,6 @@ augroup AutoCommands " Linting extension post write commands. autocmd BufWritePost *.php :call PHPFix() autocmd BufWritePost *.js :call ESLintFix() - autocmd BufWritePost *.yml :call AnsibleCheck() autocmd BufWritePost *.txt,*.md :only | :term ++rows=10 vale-wrapper % " Linting file type post write commands. @@ -314,6 +314,7 @@ augroup AutoCommands autocmd FileType c autocmd! BufWritePost silent !notify-send "$(clang-format -i % 2>&1 && echo 'clang-format OK:' %)" autocmd FileType go autocmd! BufWritePost silent !notify-send "$(gofmt -w -s -e % 2>&1 && go vet % 2>&1 && echo 'gofmt OK:' %)" autocmd FileType awk autocmd! BufWritePost silent !notify-send "$(awk -g -f % 2>&1 && awk -o- -f % | sponge % && echo 'awk OK:' %)" + autocmd FileType yaml autocmd! BufWritePost silent !notify-send "$(yaml round-trip --indent 2 --save % 2>&1 && yamllint -s % 2>&1 && echo 'yaml OK: %')" " File type function under cursor lookups. autocmd FileType go noremap df :exe ':term ++rows=10 go doc ' . expand('') -- cgit v1.2.3