summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-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')