diff options
author | tdro <tdro@users.noreply.github.com> | 2020-12-02 15:00:05 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2020-12-02 17:09:36 -0500 |
commit | befbbafb586c83b8edfbc586cdeda4dc5d982ed1 (patch) | |
tree | 7f3430b1d816d70d1c59d2ee9857620e7ae41201 /.vimrc | |
parent | 083e352c7bb4c531f4372b566e48c1011edd7ce5 (diff) | |
download | dotfiles-befbbafb586c83b8edfbc586cdeda4dc5d982ed1.tar.gz dotfiles-befbbafb586c83b8edfbc586cdeda4dc5d982ed1.tar.bz2 dotfiles-befbbafb586c83b8edfbc586cdeda4dc5d982ed1.zip |
.vimrc: Add golang checks
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -325,12 +325,14 @@ 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 && awk -o- -f % | sponge % && echo 'awk OK:' %)" autocmd FileType rust autocmd! BufWritePost <buffer> silent !notify-send "$(rustfmt % 2>&1 && echo 'rustfmt OK:' %)" + autocmd FileType go autocmd! BufWritePost <buffer> silent !notify-send "$(gofmt -w -s -e % 2>&1 && go vet % 2>&1 && echo 'gofmt OK:' %)" + autocmd FileType awk autocmd! BufWritePost <buffer> silent !notify-send "$(awk -g -f % 2>&1 && awk -o- -f % | sponge % && echo 'awk OK:' %)" " File type function under cursor lookups. - autocmd FileType elixir noremap <buffer> <leader>df :exe ':term ++rows=10 sh -c "echo ''h(' . expand('<cexpr>') . ')'' \| iex"'<cr> + autocmd FileType go noremap <buffer> <leader>df :exe ':term ++rows=10 go doc ' . expand('<cexpr>')<cr> autocmd FileType nix noremap <buffer> <leader>df :exe ':term ++rows=10 nixos-option ' . expand('<cexpr>')<cr> + 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> |