News for hackers. Stuff that matters.
Re:Vim setup for Go by sinatra on Thursday September 24, 2015 @10:53AM (#10271936)
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!
Re:Vim setup for Go by akavel on Thursday September 24, 2015 @02:05PM (#10273360)
I suggest you try https://github.com/garyburd/go-explorer too! (From creator of godoc.org.) In short words, it's godoc with hyperlinks (in your vim). I use it both for doc (so I don't have to switch to browser), and for project-wide navigation.

    :GeDoc net/http         --> opens a "gedoc" split
    :GeDoc fmt Printf       --> + jump to specific identifier
                                (note: full TAB-completion)
    :GeDoc \html_template   --> + resolve import alias like:
                                import html_template "html/template"
    zM                --> fold all
    zo                --> unfold current
    zc                --> fold current
    Ctrl-]            --> "follow link under cursor"
    Ctrl-A            --> show all! (i.e. unexported too)
Re:Vim setup for Go by vinceyuan on Thursday September 24, 2015 @08:51PM (#10275842)
YouCompleteMe crashes frequently on my mac. I can't find a solution. Does someone here have a solution?
Re:Vim setup for Go by beefsack on Thursday September 24, 2015 @09:59PM (#10276027)
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

Re:Vim setup for Go by vinceyuan on Thursday September 24, 2015 @11:01PM (#10276162)
I need to use YouCompleteMe for C++ autocomplete.
Re:Vim setup for Go by grimgrin on Thursday September 24, 2015 @12:11PM (#10272444)
goimports is so dang nice, too. If for some reason you overlooked it on the README:

Enable goimports to automatically insert import paths instead of gofmt:

let g:go_fmt_command = "goimports"

Re:Vim setup for Go by sinatra on Thursday September 24, 2015 @12:44PM (#10272709)
Yes I do use goimports. Also very useful.
Re:Vim setup for Go by farslan on Thursday September 24, 2015 @03:41PM (#10274117)
You're welcome! It's my pleasure. I'm really happy to see people writing Go in a more productive environment.