summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-11-28 22:36:53 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-11-28 22:36:53 +0100
commit05ae905e53b9304323de8ccb51648c34d89f7114 (patch)
tree923740499376bafce84728cdb2cc40de210d36fe
parent62de1a49690e21ea1aba086a6a2e205c6eb222c2 (diff)
downloaddotfiles-05ae905e53b9304323de8ccb51648c34d89f7114.tar.gz
dotfiles-05ae905e53b9304323de8ccb51648c34d89f7114.tar.bz2
dotfiles-05ae905e53b9304323de8ccb51648c34d89f7114.zip
[vim] go config
-rw-r--r--.vim/ftplugin/go.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/.vim/ftplugin/go.vim b/.vim/ftplugin/go.vim
new file mode 100644
index 0000000..1fec764
--- /dev/null
+++ b/.vim/ftplugin/go.vim
@@ -0,0 +1,15 @@
+nmap <leader>b <Plug>(go-build)
+nmap <leader>r <Plug>(go-run)
+nmap <leader>i <Plug>(go-info)
+nmap <leader>t <Plug>(go-test-func)
+nmap <leader>d <Plug>(go-doc)
+
+let g:go_fmt_command = "goimports"
+let g:go_auto_type_info = 1
+let g:syntastic_go_checkers = ['go', 'govet']
+
+set autowrite
+
+command! -bang A call go#alternate#Switch(<bang>0, 'edit')
+command! -bang AV call go#alternate#Switch(<bang>0, 'vsplit')
+command! -bang AS call go#alternate#Switch(<bang>0, 'split')