Vim script Go Shell Other
Clone or download
Latest commit 04699c8 Aug 7, 2018
Failed to load latest commit information.
.github reorder info Apr 5, 2018
assets Remove unused screenshot.png (#1635) Jan 4, 2018
autoload Merge pull request #1894 from bhcleek/async-api/gorename Aug 6, 2018
compiler Add some VimScript lint tools (#1558) Nov 16, 2017
doc update vim7.4 requirements to 7.4.2009 Jul 25, 2018
ftdetect Fix ftdetect (#1645) Jan 15, 2018
ftplugin Add command :GoIfErr Jun 8, 2018
gosnippets add tabstop on err (#1761) Apr 5, 2018
indent Fix indentation broken when using a action with a minus sign like `{{-' Dec 9, 2016
plugin update vim7.4 requirements to 7.4.2009 Jul 25, 2018
rplugin/python3/denite/source Add support for denite.nvim about :GoDecls / :GoDeclsDir (#1604) Dec 10, 2017
scripts update vim7.4 requirements to 7.4.2009 Jul 25, 2018
syntax Highlight context.Context Aug 1, 2018
templates Use a different template for test files Jun 6, 2017
test Add ./scripts/bench-syntax (#1774) Apr 8, 2018
.codecov.yml Add configuration Mar 21, 2018
.coveragerc update coverage data file location Jul 22, 2018
.dockerignore Make sure all tests run in Neovim Dec 14, 2017
.editorconfig Add scripts/docker-test (#1550) Nov 4, 2017
.gitignore Add support for denite.nvim about :GoDecls / :GoDeclsDir (#1604) Dec 10, 2017
.travis.yml travis: fix temporary vint issue Jul 17, 2018
.vintrc.yaml Add some VimScript lint tools (#1558) Nov 16, 2017 fix CHANGELOG links Aug 7, 2018
Dockerfile update to go1.10.1 (#1770) Apr 7, 2018
LICENSE Fix whitespace and typo (#1201) Feb 17, 2017
Makefile improve testing story (#1605) Dec 10, 2017 Merge pull request #1899 from bhcleek/place-test-output Aug 6, 2018
addon-info.json vim-go: remove misc/vim notes Sep 8, 2014

vim-go Build Status

Vim-go logo


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 support via gocode.
  • gofmt or goimports 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.
  • Call gometalinter with :GoMetaLinter to invoke all possible linters (golint, vet, errcheck, deadcode, etc.) and put the result in the quickfix or location list.
  • Lint your code with :GoLint, run your code through :GoVet to catch static errors, or make sure errors are checked with :GoErrCheck.
  • Advanced source analysis tools utilizing guru, such as :GoImplements, :GoCallees, and :GoReferrers.
  • ... and many more! Please see doc/vim-go.txt for more information.


vim-go requires at least Vim 7.4.2009 or Neovim 0.2.2.

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 ~/.vim/pack/plugins/start/vim-go
  • Pathogen
    • git clone ~/.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 get all the required binaries.

Check out the Install section in the documentation for more detailed instructions (:help go-install).


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 an official vim-go tutorial.


The BSD 3-Clause License - see LICENSE for more details