Skip to content

Instantly share code, notes, and snippets.

@marinhero
Created February 16, 2015 22:12
Show Gist options
  • Save marinhero/7aa7b5e62398c7f0a400 to your computer and use it in GitHub Desktop.
Save marinhero/7aa7b5e62398c7f0a400 to your computer and use it in GitHub Desktop.
Vim Go bindings
"vim-Go
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
au FileType go nmap <Leader>s <Plug>(go-implements)
au FileType go nmap <Leader>i <Plug>(go-info)
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <Leader>gb <Plug>(go-doc-browser)
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>bb <Plug>(go-build)
au FileType go nmap <leader>t <Plug>(go-test)
au FileType go nmap <leader>gi <Plug>(go-install)
au FileType go nmap <leader>c <Plug>(go-coverage)
au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
let g:go_fmt_command = "goimports"
"vim-golit
set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim
autocmd BufWritePost,FileWritePost *.go execute 'Lint' | cwindow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment