13 ms·
Vim setup for Go
- jug5 11y agoIt's not really a full setup, it's just a vim plugin.
- sinatra 11y agoI'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!
- grimgrin 11y agogoimports 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"
- sinatra 11y agoYes I do use goimports. Also very useful.
- akavel 11y agoI suggest you try https://github.com/garyburd/go-explorer 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)
- farslan 11y agoYou're welcome! It's my pleasure. I'm really happy to see people writing Go in a more productive environment.
- vinceyuan 11y agoYouCompleteMe crashes frequently on my mac. I can't find a solution. Does someone here have a solution?
- beefsack 11y agoI 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 11y agoI need to use YouCompleteMe for C++ autocomplete.
- deleted 11y ago[deleted]
- hit8run 11y agoI'm a fan of go sublime but vim-go is also really nice :)
- pella 11y agoyes, good alternative : (Dockerfile) Sublime Text 3 for Go https://github.com/jgautheron/dockerfiles/blob/master/sublime-text-go/README.md https://github.com/jgautheron/dockerfiles/blob/master/sublim...
- jshen 11y agogo-plus for atom is also really nice if you are using atom. https://github.com/joefitzgerald/go-plus https://github.com/joefitzgerald/go-plus
- todd8 11y agoCan 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 11y ago[Spacemacs](https://github.com/syl20bnr/spacemacs https://github.com/syl20bnr/spacemacs)
- bdarnell 11y agoI use go-mode, go-eldoc, gotest, company-go, and go-projectile (along with non-go-specific packages like flycheck, which has built-in go support).
- seletskiy 11y agoIt'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.
- sinatra 11y agoI think slightly differently. I don't think I import enough packages for "save file after first usage" to become a deal breaker.
- jweir 11y agoIt 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 11y agoYeah, 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 11y agoOn 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 11y agoI'm using vim-go, I just implemented autoimport functionality on top of it.
- srathi 11y agoSlightly offtopic: anyone has a similar setup for Python?
- iankp 11y agoI don't use Go so I can't compare these packages directly but you may wish to look into klen/python-mode
- agentargo 11y agohttp://docs.python-guide.org/en/latest/dev/env/ http://docs.python-guide.org/en/latest/dev/env/
- Spiritus 11y agohttps://github.com/davidhalter/jedi-vim https://github.com/davidhalter/jedi-vim perhaps?
- Spiritus 11y agohttps://github.com/davidhalter/jedi-vim https://github.com/davidhalter/jedi-vim perhaps?
- ankushio 11y agoI 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 11y agoThis. 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
- donatj 11y agoI still swear by LiteIDE. If you write go, you should try it, you will not be disappointed.