* The `af` text object is able to include the assignment variable for anonymous functions. Can be disabled with `g:go_textobj_include_variable = 0` [gh-1345]
* fix highlighting for `interface` and `structs` words when `go_highlight_types` is enabled [gh-1301]
* fix cwd for running `:GoRun` when used with neovim [gh-1296]
*`:GoFmt` handles files that are symlinked into GOPATH better (note that this behaviour is discouraged, but we're trying our best to handle all edge case :)) [gh-1310]
*`:GoTest` is able to parse error messages that include a colon `:` [gh-1316]
*`:GoTestCompile` under the hood doesn't produces a test binary anymore. Sometimes a race condition would happen which would not delete the test binary. [gh-1317]
*`:GoDef` jumps now to definition for build tags defined with `:GoBuildTags` (only guru) [gh-1319]
*`:GoLint` works on the whole directory instead of the current file. To use it for the current file give it as an argument, i.e `:GoLint foo.go` [gh-1295]
*`go_snippet_case_type` is removed in favor of the new `go_addtags_transform` setting [gh-1299]
* **:GoDoc** uses now the `-modified` flag under the hood (for `gogetdoc), which allows us to get documentation for the identifier under the cursor ina modified buffer. [gh-1014]
* Add new `g:go_gocode_socket_type` setting to change the underlying socket type passed to `gocode`. Useful to fallback to `tcp` on cases such as Bash on Windows [gh-1000]
* New **`:GoAddTags`** command that adds field tags for the fields of a struct automatically based on the field names. Checkout the demo to see it in action: https://twitter.com/fatih/status/759822857773907968 [gh-971]
* The snippet expansion `json` is now much more smarter. It pre populates the placeholder according to the first word and it also applies `snake_case` or `camelCase` conversion. Together with `:GoAddTags` it gives `vim-go` users flexible ways of populating a field tag. Checkout the demo to see it in action: https://twitter.com/fatih/status/754477622042689536 [gh-927]
* New **`:GoSameIds`** command. When called highlights all same identifiers in the current file. Can be also enabled to highlight identifiers automatically (with `:GoSameIdsAutoToggle` or `g:go_auto_sameids`). Checkout the demo to see it in action: https://twitter.com/fatih/status/753673709278339072. [gh-936]
* New **`:GoWhicherrs`** command. It shows all possible values of the selected error variable. [gh-948]
* If you open a new buffer with a Go filename it get automatically populated based on the directory. If there are no Go files a simple main package is created, otherwise the file will include the package declaration line based on the package in the current directory. Checkout the demo to see it in action: https://twitter.com/fatih/status/748333086643994624. This is enabled by default. Can be disabled with `let g:go_template_autocreate = 0`. You can use your own template with `let g:go_template_file = "foo.go"` and putting the file under the `templates/` folder. [gh-918]
* Added new toggle commands to enable/disable feature that run for your
automatic. For example if you have `let g:go_auto_type_info = 1` enabled, you
can now easily enable/disable it on the fly. Support added with the following
*`:GoDoc` accepts arguments now which are passed directly to `godoc`. So usages like `:GoDoc flag` works again (it was changed in previous versions [gh-894]
* New **`:GoImpl`** command that generates method stubs for implementing an interface. Checkout the [demo](https://twitter.com/fatih/status/729991365581545472) to see how it works. [gh-846]
*`godef` support is added back as an optional setting. By default `:GoDef` still uses `guru`, but can be changed to `godef` by adding the option: `let g:go_def_mode = 'godef'` [gh-888]
* Enable passing the `-tags` flag to `:GoDef`. Now you can pass build tags to `:GoDef` via `:GoGuruTags` or `g:go_guru_tags`
* Internal refactoring to use custom `system()` function that wraps both the standard `system()` call and `vimproc`. Now all system calls will take advantage and will use `vimproc` if installed. [gh-801]
* Completion enables now `gocode`'s `autobuild` and `propose-builtins` flags automatically. With these settings packages will be automatically build to get the freshest completion candidates and builtin keywords will be showed as well. By defaults these settings are enabled. Settings can be disabled/enabled via `g:go_gocode_autobuild` and `g:go_gocode_propose_builtins`. [gh-815]
* Improve `guru` based commands by providing automatically detected GOPATHS, such as `gb`, `godep` to be used if possible [gh-861]
* Add `<Plug>(go-imports)` mapping to make it assignable to other keys [gh-878]
* Increase compatibility with tcsh [gh-869]
* Improve `:GoInstallBinaries` for GOPATH's which don't have packages that work well with `go get -u`. We have a new `g:go_get_update` setting to disable it. By default it's enabled. [gh-883]
* Introducing code name "motion". A new whole way of moving
around and navigating (gh-765). Checkout the following new changes:
* A vim-go specific tool, called [motion](https://github.com/fatih/motion) is being developed which
provides us the underlying foundation for the following and upcoming
new features.
*`]]` and `[[` motions can be used to jump between functions
*`if` and `af` are improved and implement from scratch. It has now
support for literal functions, comments of functions, better cursor
position support and more stable.
* New `:GoDecls` and `:GoDeclsDir` commands that are available if
`ctrlp.vim` is installed. Once called one can easily jump to any generic declaration available.
* I wrote two blog posts about these new features in more detail. I recommend you to read it: [Treating Go types as objects in Vim](https://medium.com/@farslan/treating-go-types-as-objects-in-vim-ed6b3fad9287#.mbwaisevp) and [Navigation between functions and types in vim-go](https://medium.com/@farslan/navigation-between-functions-and-types-in-vim-go-f9dd7de8ca37#.2sdf8tbbe)
* A new `:GoAlternate` command that toggles to the test
file of the current file. It also has new appropriate mappings to open the
alternate file in split or tabs. (gh-704)
* Now commands can choose whether they want to open a
`quickfix` or a `location list` via the setting `g:go_list_type`. Also all
the commands have now some sensible settings, some will open a qf window,
some will open a location list (gh-700)
IMPROVEMENTS:
* Add support for goimport's new `-srcdir`. Goimports now succesfully suports `vendor/` folders with this release. (gh-735)
* Add `g:go_gorename_prefill` setting which disabled pre filling the argument for `:GoRename` (gh-711)
* Improve `:GoRun` to complete to filenames (gh-742)
* Add note about Syntastic usage as this problem comes up a lot (gh-580)
* Add note about `:GoUpdateBinaries` (gh-606)
BUG FIXES:
* Fixed `:GoErrCheck` showing the correct output when executed inside the source folder (gh-564)
* Fixed `:GoBuild` by not using `/dev/null` anymore for build output (not
supported by `go`). We pass a temporary file now. (gh-567)
* Fixed `:GoFmt` passing `g:go_fmt_options` options to `goimports`. This option
is only valid with `gofmt`. (gh-590)
* Fix vim-go for `cygwin` users. (gh-575)
* Fixed identifier in template files to be highlighted correctly (gh-559)
* Fixed character region in template files to be highlighted correctly (gh-603)
* Fixed variables in template files to be highlighted correctly (gh-611)
* Do not treat builtins as keywords. Now `make` will not highlighted but
`make()` will be highlighted (gh-605)
## 1.2 (Oct 2, 2015)
FEATURES:
* A new `:GoMetaLinter` command which invokes [gometalinter](https://github.com/alecthomas/gometalinter). Please check the PR [#553](https://github.com/fatih/vim-go/pull/553) for more detail on customizing and usage of `:GoMetaLinter`.
IMPROVEMENTS:
* Improve `:GoImport` to trim spaces when including import paths of form `"fmt "`
* Avoid setting `filetype` twice. Previously it was doing it twice, which was expensive
* Improve handling of GOPATH's with trailing `/` characters, such as `/home/user/go/`
* Add a new `g:go_highlight_string_spellcheck` feature, which is enabled by feature. Now if spell is enabled, go strings are also checked.
* Specify our limited but functional [gb](http://getgb.io/) support
BUG FIXES:
* Fixed `:GoRun` to display errors when `g:go_dispatch_enabled` was enabled
* Fixed `:GoErrCheck` not showing `PASS` message if the command was successful
* Fixed `:GoErrCheck` not executing in the directory of the currently edited file
* Close quickfix window after a successful second round of `:GoInstall`
* Fix passing files rather than packages to certain oracle commands.
* Escape files passed to oracle command. This could lead to some serious things.
* Clear `g:go_oracle_scope` when the scope was reseted. Previously it was set to empty string, which was causing false positives.
* Correct various misspellings.
## 1.1 (Jul 25, 2015)
With this release the version will now increase in `minor` levels. So the next
release will be `1.2`, the other one `1.3`, etc.. This provides us more
flexibility (like releasing patch versions if needed).
FEATURES:
* A new `:GoGenerate` command is now available which can be used to invoke `go generate` within vim
* Vim-go didn't had any license, now we use BSD 3-Clause License (the same as Go). This is needed for Linux distributions to package vim-go and is also something that people asked for.
GoGenerate, GoErrcheck, GoLint, and GoVet` to handle multiple arguments.
Previously this feature was limited to only certain commands. What this means
is, for example `:GoVet . -all` will invoke `go tool vet . -all`
automatically instead of plan `go vet`. This is one of the big changes in
this release, so give it a try :)
* Improved `:GoFmt` command, which now uses the `-w` flag to
write to the source code directly, instead of outputting it to stdout. This
makes `:GoFmt` much more faster than the current implementation. This is one
of the big changes in this release, so feedback is welcome!
* Improve `:GoImport` to have a `!` feature. Now when when called
with a `!` appended it will go get it. i.e: `:GoImport!
github.com/fatih/color`. Useful if `:GoImport` fails and you want to download
it.
* Automatic GOPATH detections can now detect `gb` vendored folders. Some commands should now work without any problem when invoked on a `gb` project.
* All command arguments are now properly escaped for shell invocation.
* Added the `-f` flag to :GoInstallBinaries command to support `git url.<base>.insteadOf` configuration
* Improve width and precision highlighting, such as `%s %5s %-5s %5.5f %.5f`
* Show an error if a region is not selected when `:GoFreeVars` is called
BUG FIXES:
* Fix`:GoDef` for files containing spaces. We know escape the files before passing to `:GoDef`
* Fix `:GoFmt` not picking up the correct GOPATH when the fmt command was set to `goimports`
* Fix and simplify README.md, add Wiki reference
* Fixed tagbar integration to show correct imports.
## 1.0.5 (May 26, 2015)
FEATURES:
* A new `:GoOracleScope` is added to change the oracle scope on-the-fly. It
accepts import paths as arguments. If no arguments are passed it prints the
current custom oracle scope. `:GoOracleScope` also supports completion of
import paths, so it's very fast and handy to use. `:GoOracleScope ""` clears
the current custom scope.
* A new `:GoPath` command that displays the current `GOPATH`. A path can be
passed to change the `GOPATH` (i.e `:GoPath ~/foo/src`). `:GoPath ""` clears
and resets the `GOPATH` to the initial value.
* A new "autodetect GOPATH" feature is added. This automatically detects if the
project is using `godep` or is under a `src` root directory which is not in
`GOPATH` and changes/modifies the `GOPATH` so all commands work based on this
GOPATH. What this means is, commands such as `:GoDef`, `:GoBuild`, etc.. will
include the Godeps folder. For example any go-to-definition via `:GoDef` will
jump to the source code inside Godeps. This is enabled by default, but can
disabled with `let g:go_autodetect_gopath = 0`. This new feature is also the
foundation for other tools such as `gb` or `wgo`.
IMPROVEMENTS:
* Improve `:GoFmt` (gofmt and goimports) speed. Now it's 2x faster than the previous implementation.
* Add Dispatch support for `:GoBuild` and `:GoRun`. For more info about
dispatch see https://github.com/tpope/vim-dispatch . By default it's
disabled, to enable it add `let g:go_dispatch_enabled = 1` to your vimrc.
* Add support for the bang `!` attribute for all `go` tool commands. What this
does it, if `:GoBuild` is called it will jump to the error. But `:GoBuild!`
will not jump to any error. This has the same behavior as the internal
`:make` command in vim. We had this feature already for `:GoBuild` and
`:GoRun`. But not for `:GoInstall`, `:GoTest`, etc.. Now all commands are
unified.
* Add autojump to error for `:GoInstall`.
* Add autowrite feature for `:GoInstall`, `:GoTestXXX` functions and `:GoVet`
* Support `git url.<base>.insteadOf` and custom import paths of binaries. This
improves the commands `:GoInstallBinaries` and `:GoUpdateBinaries`.
* Add support for highlighting go templates with `*.tmpl` extensions. Based on
the work from @cespare from https://github.com/cespare/vim-go-templates
BUG FIXES:
* Fix clearing the status bar when `:GoErrCheck` is called
* Fix godocNotFound to not match 'os' pkg contents. This improves the command
`:GoDoc`
* Fix parsing and jumping to error locations when used Vim from a different
directory than the current buffer's directory
* Fix completion showing duplicates paths for completion results, such as
github.com/fatih/color and github.com/fatih/color/.
## 1.0.4 (Apr 28, 2015)
FEATURES:
* A new `:GoTestFunc` command (with appropriate
mappings) is added. Run tests function which surrounds the current cursor
location. Useful to test single tests.
* Highlight all Go operators. Previously not all
operators were highlighted. As previously, to highlight options, enable it
with by setting `g:go_highlight_operators` to 1 in your vimrc.
IMPROVEMENTS:
* Improved certain `:GoDoc` usages to show a better error message
* Improved `:GoRename` to have a default value for rename input. Avoids retyping similar words.
* Synced with latest Oracle version. `callgraph` is removed.
* Removed our custom referrers mode. New version of oracle now displays the matching lines.
BUG FIXES:
* Fixed the internal `executeInDir` function which was failing when ignorelist was not set properly.
* Fixed trailing slash for package completion with `:GoImport`
* Fixed paths in error list for Windows users.
* Fixed not showing "import cycle not allowed" error message when called `:GoBuild` or `:GoRun`
* Fixed users using vimproc requiring arguments to functions to be escaped.
* Fixed depth for test snippets
* Fixed neosnippet support loading snippet files the second time if necessary.
## 1.0.3 (Mar 7, 2015)
FEATURES:
* A new `:GoTestCompile` command (with appropriate mappings) is added. Useful to compile a test binary or show/fix compile errors in quickfix window
IMPROVEMENTS:
*`referrer` mode is improved to show referring lines in the quickfix window
* A new `errt` snippet is added, which expands to `if err != nil { t.Fatal(err) }`
* A new `errh` snippet is added, useful to be used in a `http.Handler`
* UltiSnips snippets are improved to take advance of Vim's `Visual` mode. For example selecting a block and typing `if` will create an if scope around the block.
* Cleanup README.md
BUG FIXES:
* Fix trimming brackets if completion was invoked on a previous completion
* Fix Oracle scope settings. Added docs about usage.
* Fixed previously broken `var` and `vars` snippets
* Fix duplicate docs
* Fix fallback binary path for Windows users. The fallback mechanism is used to discover the necessary Go tools, such as `godef`, `gocode`, etc...
## 1.0.2 (Feb 17, 2015)
FEATURES:
* New snippets are added, mostly for testing ( [changes](https://github.com/fatih/vim-go/pull/321/files))
IMPROVEMENTS:
* Enable all Oracle commands. Docs, mappings and commands are also added. It uses Quickfix list instead of a custom UI.
* Clarify installation process in Readme, add instructions for vim-plug, NeoBundle and manual.
BUG FIXES:
* Fix shiftwidth parsing, it was broken in the previous release for old Vim versions
* Fix experimantal mode
## 1.0.1 (Feb 9, 2015)
FEATURES:
* New feature to highlight build constraints (disabled by default)
IMPROVEMENTS:
* Updated godef import path
* Updated Readme for possible problems with `csh`
* Documentation for text objects are updated, typo fixes are merged
* If vimproc is installed, Windows users will use it for autocompletion
* Improve UltiSnips snippets to pick Visual selection (demo: http://quick.as/0dvigz5)
* Packages with extensions, like "gopkg.in/yaml.v2" can be now displayed
* Packages with different import paths, like "github.com/bitly/go-simplejson" can be now displayed
BUG FIXES:
* Fatal errors are now parsed successfully and populated to quickfix list
* Shiftwidth is changed to use shiftwidth() function. Fixes usage with plugins like vim-sleuth and possible mis usage (like setting shiftwidth to zero)
* Added a new [Donation](https://github.com/fatih/vim-go#donations) section to Readme, for those who ask for it.
* Fix parsing of errcheck error syntax
* Fix consistency between Neosnippet and UltiSnips snippets
## 1.0 (Dec 24, 2014)
We don't tag any changes or releases, so let's start with `1.0`. Our Windows
support is now in a good shape, tons of bugs are fixed, many new features and
improvements is being added and it's getting better with each day (thanks to