diff options
author | tdro <tdro@users.noreply.github.com> | 2020-10-30 03:12:44 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2020-10-30 03:12:44 -0400 |
commit | ae0c740886ce0275eae716f1ad6ee3d17900d67f (patch) | |
tree | cfc75986cfdb9dacb218807ff40223ba13eb9653 /.vimrc | |
parent | 82c264220a7b21b3caaef46f7517e6d98802e8a0 (diff) | |
download | dotfiles-ae0c740886ce0275eae716f1ad6ee3d17900d67f.tar.gz dotfiles-ae0c740886ce0275eae716f1ad6ee3d17900d67f.tar.bz2 dotfiles-ae0c740886ce0275eae716f1ad6ee3d17900d67f.zip |
.vimrc: Add elixir format
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -137,6 +137,12 @@ function! NixCheck() :redraw! endfunction +" Elixir Format +function! ElixirFormat() + :silent !notify-send -t 10000 "$(mix format % 2>&1 && echo 'Elixir Format OK: %')" >/dev/null 2>&1 + :redraw! +endfunction + "---------------Shortcuts---------------" @@ -306,13 +312,14 @@ augroup AutoCommands " Linting auto 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 % 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:' %)" - " REPL commands + " REPL commands. autocmd FileType go noremap <buffer> <leader>cc :REPL gore<cr> autocmd FileType lua noremap <buffer> <leader>cc :REPL lua<cr> autocmd FileType php noremap <buffer> <leader>cc :REPL psysh<cr> |