HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
fatih
vim-go
Vim Script2014–2020
fatih / vim-go

vim-go

Go development plugin for Vim

29Distinct people
35Mentions
0Explicit recommenders
16.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Go development plugin for Vim

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 8:27:21 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year35 dated mentions

Observed mentions: 2014-03-29 18:43:02 UTC to 2020-11-12 21:30:50 UTC.

0369122014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 11 mentions; 4 submissions, 7 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 7 mentions; 3 submissions, 4 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC514
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC1147
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC734
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC413
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC404

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
vim-go Features This plugin adds Go language support for Vim, with the following main features: Compile your package with :GoBuild, install it with :GoInstall or test it with :GoTest. Run a single test with :GoTestFunc). Quickly execute your current file(s) with :GoRun. Improved syntax highlighting and folding. Debug programs with integrated delve support with :GoDebugStart. Completion and many other features support via gopls. formatting on save keeps the cursor position and undo history. Go to symbol/declaration with :GoDef. Look up documentation with :GoDoc or :GoDocBrowser. Easily import packages via :GoImport, remove them via :GoDrop. Precise type-safe renaming of identifiers with :GoRename. See which code is covered by tests with :GoCoverage. Add or remove tags on struct fields with :GoAddTags and :GoRemoveTags. Lint your code with :GoLint or :GoMetaLinter, run your code through :GoVet to catch static errors, or make sure errors are checked with :GoErrCheck. Advanced source analysis utilizing gopls, such as :GoImplements, :GoCallees, and :GoReferrers. ... and many more! Please see doc/vim-go.txt for more information. Integration with gopls. The gopls instance can be shared with other Vim plugins. Vim-go's use of gopls can be disabled and alternative tools can be used when desired. Integration with Tagbar via gotags. Integration with Ultisnips and other snippet engines. Install vim-go requires at least Vim 8.2.5072 or Neovim 0.4.0. The latest stable release is the recommended version to use. If you choose to use the master branch instead, please do so with caution; it is a development branch. vim-go follows the standard runtime path structure. Below are some helper lines for popular package managers: Vim 8 packages git clone https://github.com/fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go Neovim packages git clone https://github.com/fatih/vim-go.git ~/.local/share/nvim/site/pack/plugins/start/vim-go Pathogen git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go vim-plug Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Vundle Plugin 'fatih/vim-go' You will also need to install all the necessary binaries. vim-go makes it easy to install all of them by providing a command, :GoInstallBinaries, which will go install all the required binaries. Check out the Install section in the documentation for more detailed instructions (:help go-install). Usage The full documentation can be found at doc/vim-go.txt. You can display it from within Vim with :help vim-go. Depending on your installation method, you may have to generate the plugin's help tags manually (e.g. :helptags ALL). We also have a tutorial in the official vim-go wiki. FAQ and troubleshooting The FAQ and troubleshooting tips are in the documentation and can be quickly accessed using :help go-troubleshooting. If you believe you've found a bug or shortcoming in vim-go that is neither addressed by help nor in existing issues, please open an issue with clear reproduction steps. :GoReportGitHubIssue can be used pre-populate a lot of the information needed when creating a new issue. Contributing All PRs are welcome. If you are planning to contribute a large patch or to integrate a new tool, please create an issue first to get any upfront questions or design decisions out of the way first. You can run the tests locally by running make. It will lint the VimL for you, lint the documentation, and run the tests against the minimum required version of Vim, other versions of Vim that may be critical to support, and Neovim. License The BSD 3-Clause License - see LICENSE for more details
Read the full README on GitHub

What Hacker News says

11 sources
I'm surprised to see the author mention not being able to compile when there are unused imports. Editor plugins that call goimports have solved this problem for a long time now. For example, I use vim-go (https://github.com/fatih/vim-go), and if I remove the only line of code that references the "fmt" package, the "fmt" import line at the top of the file will automatically be removed. Edit: Here is the reasoning on the FAQ behind code with unused imports not compiling: https://golang.org/doc/faq#unused_variables_and_imports
In Problems with Go's design
Author here. Vim doesn't have type by completion support, however it imho has completion, but it needs to be triggered manually with a key shortcut(such as C-X C-O). Plugins like YCM changes this behavior to on the fly completion. For gifs, I have couple of screencasts already (all in Wiki: https://github.com/fatih/vim-go/wiki/Screencasts), but yeah we could definitely add a GIF, but my time is limited for this kind of stuff :)
In Vim setup for Go
Yes, and no. #3 - ("T{A:1, B:2} is better than T{1, 2}") - usually yes, and you'd want to write it multi-line for readability etc (see #4); but there are times, when you exactly want to benefit from the fact, that T{1, 2} is verified for completeness. And sometimes it can read better in table tests. (Sometimes. Only sometimes.) #5 - as others said already, you can be smart and spare yourself some dumb work here and use golang.org/x/tools/cmd/stringer + go generate. #6 - even better: start from 0, and make sure the 0 value is correct as the default value for unitialized variable/field! E.g.: const ( Stopped State = iota Running Rebooting Terminated ) // That said, this is assuming the "Stopped" can also mean "pre-running". // Otherwise, add a named "Uninitialized" state, or something. #7 - I
Read the rest
believe sometimes yes, sometimes not. Especially in longer functions, for the sake of "no surprises", it might be easier for readers to just keep multiple boring (read: regular) "return 0, err" blocks, and final "return x, nil". Also, it's then slightly easier to add more code to such a function (in growing codebase), and/or refactor it. Still, for cases when this results in a concise one-liner, totally yes! #9 - as Author notes at the end, "This approach has the disadvantage that it pushes out the indentation and makes it harder to read. Again seek always the simplest solution." In my opinion, nice trick to know, but usually a "x := NewContext(...); defer x.Close()" or similar is the standard idiom. NOTE: Especially for locks, I'd say you won't be adding anything to the block in future (see also: YAGNI). On the contrary, you might actually want to change it to a RWLock at some point, and then modify only some of the uses, and then the func would actually make it more annoying. #10 - I'd say, only when you need it. If you don't need the lock, just use the map. If you need the lock... usually, I'd think you probably already have some higher level meaning for the "map", so I'd suggest to already wrap it in a proper type name & higher-level interface. "type FooRegistry { ... }; func (r * FooRegistry) Register(...)" etc. (And, actually, probably don't add the Delete() yet, until you really need it.) And probably you already have more complexity at this point that you'll want to nicely encapsulate in those funcs. That said, all of the above is just my subjective opinion, too. "#11" - By the way: if you're able to force yourself to use vim, absolutely have a look at the Author's https://github.com/fatih/vim-go plugin. Especially with full oracle support, it's a killer.
In Useful Techniques in Go
(Disclaimer: I'm the author of vim-go [1]) I think vim-go has a really nice balance here. Part of the strength comes from the excellent tooling the Go community created. Each tool is orthogonal to each other and they are pluggable and reusable. So vim-go for example uses these tools to create wrappers around it and blend it like it's a part of Vim itself. It's not a IDE of course, however it feels like that. I think the most important thing here is providing a orthogonal tools and well defined boundaries between them (which the Go tools have achieved already). Once that is established, more greater and better tools can be created upon on it. I look for other language plugins from time to time and each time I see the same thing. The language which the plugin is build on itself doesn't have the sense of "orthogonality". So it makes it diffi
Read the rest
cult to create plugin and support it. Once the underlying language and the community get the sense for it, the tool(in our case the Vim plugin and ecosystem) will improve itself too. [1]: https://github.com/fatih/vim-go
In Scala development in Vim

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.