You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Buddy Sandidge cb8406634f Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
..
.github Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
assets Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
autoload Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
compiler Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
doc Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
ftdetect Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
ftplugin Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
gosnippets Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
indent Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
plugin Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
rplugin/python3/denite/source Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
scripts Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
syntax Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
templates Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
test Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
.coveragerc Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
.dockerignore Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
.editorconfig Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
.gitignore Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
.travis.yml Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
.vintrc.yaml Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
CHANGELOG.md Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
Dockerfile Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
LICENSE Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
Makefile Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
README.md Merge commit 'c7496b281674ca5d9fc6adc558d4cc8a6f824631' into main 7 years ago
addon-info.json Merge commit 'c9ca63a8197001d146e52aa9259aad22f5bba326' as 'vim/bundle/go' 9 years ago

README.md

vim-go Build Status

Vim-go logo

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 tests with :GoTestFunc).
  • Quickly execute your current file(s) with :GoRun.
  • Improved syntax highlighting and folding.
  • 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.
  • Automatic GOPATH detection which works with gb and godep. Change or display GOPATH with :GoPath.
  • 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.
  • Precise type-safe renaming of identifiers with :GoRename.
  • ... and many more! Please see doc/vim-go.txt for more information.

Install

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
  • Pathogen
    • git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go
  • vim-plug
    • Plug '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).

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

License

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