Skip to content

Commit

Permalink
Better configuration for Go-Vim
Browse files Browse the repository at this point in the history
  • Loading branch information
spf13 committed Nov 17, 2015
1 parent 9af9ba7 commit 4194449
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,29 @@

" Plugins {

" GoLang {
if count(g:spf13_bundle_groups, 'go')
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_fmt_command = "goimports"
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
au FileType go nmap <Leader>s <Plug>(go-implements)
au FileType go nmap <Leader>i <Plug>(go-info)
au FileType go nmap <Leader>e <Plug>(go-rename)
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>b <Plug>(go-build)
au FileType go nmap <leader>t <Plug>(go-test)
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <leader>co <Plug>(go-coverage)
endif
" }


" TextObj Sentence {
if count(g:spf13_bundle_groups, 'writing')
augroup textobj_sentence
Expand Down Expand Up @@ -1039,6 +1062,8 @@
endif
" }



" }

" GUI Settings {
Expand Down

0 comments on commit 4194449

Please sign in to comment.