aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2020-11-22 22:28:59 -0500
committertdro <tdro@users.noreply.github.com>2020-11-22 22:28:59 -0500
commit35cd3f21f19e95d20ebc294ae3f5037fa3333910 (patch)
treef299d64a11d1bd267435ee1eebc6cc92e45f9928 /.vimrc
parentc05ef87b974363cef0344cb1f3799a405156223e (diff)
downloaddotfiles-35cd3f21f19e95d20ebc294ae3f5037fa3333910.tar.gz
dotfiles-35cd3f21f19e95d20ebc294ae3f5037fa3333910.tar.bz2
dotfiles-35cd3f21f19e95d20ebc294ae3f5037fa3333910.zip
.vimrc: Add simple awk REPL and linter
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index fd0a3af..b11099b 100644
--- a/.vimrc
+++ b/.vimrc
@@ -320,6 +320,7 @@ augroup AutoCommands
autocmd FileType bash,sh autocmd! BufWritePost <buffer> :call ShellCheck()
autocmd FileType nix autocmd! BufWritePost <buffer> silent call NixCheck()
autocmd FileType elixir autocmd! BufWritePost <buffer> :call ElixirFormat()
+ autocmd FileType awk autocmd! BufWritePost <buffer> silent !notify-send "$(awk -g -f % 2>&1 && echo 'awk OK:' %)"
autocmd FileType rust autocmd! BufWritePost <buffer> silent !notify-send "$(rustfmt % 2>&1 && echo 'rustfmt OK:' %)"
" File type function under cursor lookups.
@@ -338,6 +339,7 @@ augroup AutoCommands
autocmd FileType python noremap <buffer> <leader>cc :REPL python<cr>
autocmd FileType perl noremap <buffer> <leader>cc :REPL perl -de0<cr>
autocmd FileType javascript noremap <buffer> <leader>cc :REPL node<cr>
+ autocmd FileType awk noremap <buffer> <leader>cc :term ++rows=10 ++close awk -f %<cr>
" General auto commands.
autocmd BufWritePost *.tex :term ++close ++rows=10 latex-compile %