From 2b91d8708e9beedb72df062ebd7d740dad974307 Mon Sep 17 00:00:00 2001 From: tdro Date: Sun, 6 Dec 2020 21:18:13 -0500 Subject: .vimrc: Remove prettier HTML linter --- .vimrc | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 8e50b47..5a2a6cd 100644 --- a/.vimrc +++ b/.vimrc @@ -92,20 +92,9 @@ function! PHPFix() :redraw! endfunction -" HTML Beautify -function! HTMLBeautify() - :silent !notify-send "$(prettier --write --parser html % 2>&1)" - :redraw! -endfunction - -" CSS Beautify -function! CSSBeautify() - :silent !notify-send "$(prettier --write --parser css %)" -endfunction - " ESLint Fix function! ESLintFix() - :silent !notify-send -t 10000 "$(eslint -c $HOME/.config/eslintrc.yml --fix %)" >/dev/null 2>&1 + :silent !notify-send -t 10000 "$(eslint -c $HOME/.config/eslintrc.yml --fix %)" > /dev/null 2>&1 endfunction " Ansible Check @@ -115,18 +104,18 @@ endfunction " Shell Check function! ShellCheck() - :silent !notify-send -t 10000 "$(shellcheck -x --exclude=SC1090,SC1091 % && echo 'Shellcheck OK: %')" >/dev/null 2>&1 & + :silent !notify-send -t 10000 "$(shellcheck -x --exclude=SC1090,SC1091 % && echo 'Shellcheck OK: %')" > /dev/null 2>&1 & endfunction " Nix Check function! NixCheck() - :silent !notify-send -t 10000 "$(nix-linter % 2>&1 && echo 'Nix Lint OK: %' && nixfmt %)" >/dev/null 2>&1 + :silent !notify-send -t 10000 "$(nix-linter % 2>&1 && echo 'Nix Lint OK: %' && nixfmt %)" > /dev/null 2>&1 :redraw! endfunction " Elixir Format function! ElixirFormat() - :silent !notify-send -t 10000 "$(mix format % 2>&1 && echo 'Elixir Format OK: %')" >/dev/null 2>&1 + :silent !notify-send -t 10000 "$(mix format % 2>&1 && echo 'Elixir Format OK: %')" > /dev/null 2>&1 :redraw! endfunction @@ -188,10 +177,6 @@ nmap set :set tabstop=2 softtabstop=0 shiftwidth=2 smarttab noexpandtab nmap q :bd nmap w c -" Linting shortcuts -nmap lph :call HTMLBeautify() -nmap lpc :call CSSBeautify() - " Re-indent entire file nmap re gg=G @@ -295,7 +280,6 @@ function s:cursor(selection) endfunction command! -nargs=? -range Jump call s:cursor(@*) - command! -nargs=? -range REPL call s:repl(, , ) @@ -322,6 +306,7 @@ augroup AutoCommands autocmd FileType bash,sh autocmd! BufWritePost :call ShellCheck() autocmd FileType nix autocmd! BufWritePost silent call NixCheck() autocmd FileType elixir autocmd! BufWritePost :call ElixirFormat() + autocmd FileType css autocmd! BufWritePost silent !notify-send "$(prettier --write --parser css % 2>&1)" autocmd FileType rust autocmd! BufWritePost silent !notify-send "$(rustfmt % 2>&1 && echo 'rustfmt OK:' %)" 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:' %)" -- cgit v1.2.3