aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2022-02-24 00:48:09 -0500
committertdro <tdro@users.noreply.github.com>2022-02-24 00:48:25 -0500
commitee3511b2994a20bbd7e644d2600ec332cf2a72b3 (patch)
treea79782516fc8aeb0d84df8bb0db9eade35c3da8e /.vimrc
parent89e437b7b67c9ffdb087c5405246c31ce85b2cec (diff)
downloaddotfiles-ee3511b2994a20bbd7e644d2600ec332cf2a72b3.tar.gz
dotfiles-ee3511b2994a20bbd7e644d2600ec332cf2a72b3.tar.bz2
dotfiles-ee3511b2994a20bbd7e644d2600ec332cf2a72b3.zip
.vimrc: Format XML
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc1
1 files changed, 1 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index bddb341..d66d15f 100644
--- a/.vimrc
+++ b/.vimrc
@@ -288,6 +288,7 @@ augroup AutoCommands
autocmd FileType haskell autocmd! BufWritePost <buffer> exe 'Notify(''hlint ' . expand('%') . ' 2>&1 && brittany --write-mode inplace ' . expand('%') . ' 2>&1'')' | :e
autocmd FileType c autocmd! BufWritePost <buffer> exe 'Notify(''clang-format -i ' . expand('%') . ' 2>&1 && printf "Clang Format OK: ' . expand('%') . '"'')' | :e
autocmd FileType bash,sh autocmd! BufWritePost <buffer> exe 'Notify(''shellcheck -x --exclude=SC1090,SC1091 ' . expand('%') . ' 2>&1 && printf "Shellcheck OK: ' . expand('%') . '"'')'
+ autocmd FileType xml autocmd! BufWritePost <buffer> exe 'Notify(''xmllint --pretty 1 ' . expand('%') . ' 2>&1 | sponge ' . expand('%') . ' && printf "XML OK: ' . expand('%') . '"'')' | :e
autocmd FileType go autocmd! BufWritePost <buffer> exe 'Notify(''gofmt -w -s -e ' . expand('%') . ' 2>&1 && go vet ' . expand('%') . ' 2>&1 && printf "Go Format OK: ' . expand('%') . '"'')' | :e
autocmd FileType nix autocmd! BufWritePost <buffer> exe 'Notify(''nix-linter ' . expand('%') . ' 2>&1 && printf "Nix Lint OK: ' . expand('%') . '"' . ' && nixfmt ' . expand('%') . ' 2>&1' . ''')' | :e
autocmd FileType tex autocmd! BufWritePost <buffer> exe 'Notify(''latexindent ' . expand('%') . ' 2>&1 && printf "LaTeX OK: ' . expand('%') . '"'')' | :e | :only | :term ++close ++rows=10 latex-compile %