aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2020-10-30 23:41:34 -0400
committertdro <tdro@users.noreply.github.com>2020-10-30 23:43:19 -0400
commit0805f12556e5a3067e152ef65416b57becbd472e (patch)
treef4201d7f28a183058d868142b349be42d27db466 /.vimrc
parentae0c740886ce0275eae716f1ad6ee3d17900d67f (diff)
downloaddotfiles-0805f12556e5a3067e152ef65416b57becbd472e.tar.gz
dotfiles-0805f12556e5a3067e152ef65416b57becbd472e.tar.bz2
dotfiles-0805f12556e5a3067e152ef65416b57becbd472e.zip
.vimrc: Add elixir function lookups
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc7
1 files changed, 6 insertions, 1 deletions
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 <buffer> :call ShellCheck()
autocmd FileType nix autocmd! BufWritePost <buffer> silent call NixCheck()
autocmd FileType rust autocmd! BufWritePost <buffer> silent !notify-send "$(rustfmt % 2>&1 && echo 'rustfmt OK:' %)"
+ " File type function lookups.
+ autocmd FileType elixir noremap <buffer> <leader>df :exe ':term ++rows=10 sh -c "echo ''h(' . expand('<cexpr>') . ')'' \| iex"'<cr>
+
" REPL commands.
autocmd FileType go noremap <buffer> <leader>cc :REPL gore<cr>
autocmd FileType lua noremap <buffer> <leader>cc :REPL lua<cr>