let g:go_fmt_fail_silently = 1 let g:go_fmt_command = "gofmt" "Explicited the formater plugin (gofmt, goimports, goreturn...) " Show a list of interfaces which is implemented by the type under your cursor au FileType go nmap s (go-implements) " Show type info for the word under your cursor au FileType go nmap i (go-info) " Open the relevant Godoc for the word under the cursor au FileType go nmap gd (go-doc) au FileType go nmap gv (go-doc-vertical) " Open the Godoc in browser au FileType go nmap gb (go-doc-browser) " Run/build/test/coverage au FileType go nmap gr (go-run) au FileType go nmap gb (go-build) au FileType go nmap gt (go-test) au FileType go nmap gc (go-coverage) " By default syntax-highlighting for Functions, Methods and Structs is disabled. " Let's enable them! let g:go_highlight_functions = 1 let g:go_highlight_methods = 1 let g:go_highlight_structs = 1 nmap :TagbarToggle let g:tagbar_type_go = { \ 'ctagstype' : 'go', \ 'kinds' : [ \ 'p:package', \ 'i:imports:1', \ 'c:constants', \ 'v:variables', \ 't:types', \ 'n:interfaces', \ 'w:fields', \ 'e:embedded', \ 'm:methods', \ 'r:constructor', \ 'f:functions' \ ], \ 'sro' : '.', \ 'kind2scope' : { \ 't' : 'ctype', \ 'n' : 'ntype' \ }, \ 'scope2kind' : { \ 'ctype' : 't', \ 'ntype' : 'n' \ }, \ 'ctagsbin' : 'gotags', \ 'ctagsargs' : '-sort -silent' \ }