From 0805f12556e5a3067e152ef65416b57becbd472e Mon Sep 17 00:00:00 2001 From: tdro Date: Fri, 30 Oct 2020 23:41:34 -0400 Subject: .vimrc: Add elixir function lookups --- .vimrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 18970be..6ef1526 100644 --- a/.vimrc +++ b/.vimrc @@ -309,16 +309,21 @@ augroup AutoCommands " Reload plugins.vim on file save. autocmd BufWritePost plugins.vim source % | silent !notify-send 'Sourcing plugins...' - " Linting auto commands. + " Linting extension post write commands. autocmd BufWritePost *.php :call PHPFix() autocmd BufWritePost *.js :call ESLintFix() autocmd BufWritePost *.ex :call ElixirFormat() autocmd BufWritePost *.yml :call AnsibleCheck() autocmd BufWritePost *.txt,*.md :only | :term ++rows=10 vale-wrapper % + + " Linting file type post write commands. autocmd FileType bash,sh autocmd! BufWritePost :call ShellCheck() autocmd FileType nix autocmd! BufWritePost silent call NixCheck() autocmd FileType rust autocmd! BufWritePost silent !notify-send "$(rustfmt % 2>&1 && echo 'rustfmt OK:' %)" + " File type function lookups. + autocmd FileType elixir noremap df :exe ':term ++rows=10 sh -c "echo ''h(' . expand('') . ')'' \| iex"' + " REPL commands. autocmd FileType go noremap cc :REPL gore autocmd FileType lua noremap cc :REPL lua -- cgit v1.2.3