
Vim setup for Go - hit8run
https://github.com/fatih/vim-go
======
sinatra
I've been using vim-go for about one year now. The combination of vim-go,
gofmt and YouCompleteMe is all you need for a perfect Go setup. Thanks to
Fatih and Val!

~~~
vinceyuan
YouCompleteMe crashes frequently on my mac. I can't find a solution. Does
someone here have a solution?

~~~
beefsack
I switched from YCM to neocomplete[1] a few months ago and haven't looked
back, performance is much better. I'm on Arch and never really had crashes
with YCM, but if the crashes are performance related it might help.

[1]
[https://github.com/Shougo/neocomplete.vim](https://github.com/Shougo/neocomplete.vim)

~~~
vinceyuan
I need to use YouCompleteMe for C++ autocomplete.

------
ankushio
I am not a vim user and I've been using IntelliJ IDEA to code in GoLang for
about an year now and I find it extremely powerful. It is powered using the
GoLang IntelliJ plugin : [https://github.com/go-lang-plugin-org/go-lang-idea-
plugin](https://github.com/go-lang-plugin-org/go-lang-idea-plugin)

It provides : 1) Error Highlighting, 2) Auto Completion, 3) Click-to-Navigate,
4) Auto Formatting, 5) Auto Importing, among other features.

------
jmcphers
This. I've seen my teammates try other Go IDE integrations but this just beats
the pants off all of them and our whole team wound up standardizing on it.

It combines well with Tim Pope's dispatch plugin for doing an async 'go build'
or 'go test' while you code:

[https://github.com/tpope/vim-dispatch](https://github.com/tpope/vim-dispatch)

------
todd8
Can someone recommend a set of Emacs libraries that works as well as this? I'm
about to embark on a real project in go.

~~~
IanMalcolm
[Spacemacs]([https://github.com/syl20bnr/spacemacs](https://github.com/syl20bnr/spacemacs))

~~~
todd8
Spacemacs has so much in it that I've been avoiding looking into it. It seems
to do everything! I'll try it out, thanks.

~~~
aliem
On the bright side it does have a nice modular configuration in
`~/.spacemacs`.

------
donatj
I still swear by LiteIDE. If you write go, you should try it, you will not be
disappointed.

------
jshen
go-plus for atom is also really nice if you are using atom.

[https://github.com/joefitzgerald/go-
plus](https://github.com/joefitzgerald/go-plus)

------
hit8run
I'm a fan of go sublime but vim-go is also really nice :)

~~~
pella
yes,

good alternative : (Dockerfile) Sublime Text 3 for Go

[https://github.com/jgautheron/dockerfiles/blob/master/sublim...](https://github.com/jgautheron/dockerfiles/blob/master/sublime-
text-go/README.md)

------
srathi
Slightly offtopic: anyone has a similar setup for Python?

~~~
Spiritus
[https://github.com/davidhalter/jedi-vim](https://github.com/davidhalter/jedi-
vim) perhaps?

------
seletskiy
It's really nice, but lack specific feature of auto-importing packages while
typing. Like, if you type `fmt.` and package is not imported yet, you'll not
see any completions.

So, I've implemented it a while ago in separate coding-helping plugin, see the
gif: [https://github.com/reconquest/vim-
pythonx#autoimport](https://github.com/reconquest/vim-pythonx#autoimport)

UPD: also, some gifs, showing how coding routine I believe should be done
(Golang taken as example): [https://github.com/reconquest/snippets#let-me-
show](https://github.com/reconquest/snippets#let-me-show). Type less, get
more.

~~~
jweir
It does, just not by default, and only on save – not while typing.

> Enable goimports to automatically insert import paths instead of gofmt:

> let g:go_fmt_command = "goimports"

~~~
seletskiy
Yeah, only on save.

It's deal breaker for me, I want to see completions immediately, not by
entering `fmt.`, saving file, backspacing, re-entering `.`.

~~~
fizzbatter
On the flipside, what implements this functionality you speak of? I ask,
because you mention it being a deal breaker for vim-go, so i'm curious what
you currently use?

~~~
seletskiy
I'm using vim-go, I just implemented autoimport functionality on top of it.

