vim-go v1.18 Release Notes
Release Date: 2018-07-18 // almost 6 years ago-
๐ FEATURES:
- Add :GoIfErr command together with the
<Plug>(go-iferr)
plug key to create a custom mapping. This command generates anif err != nil { return ... }
automatically which infer the type of return values and the numbers. For example:
func doSomething() (string, error) { f, err := os.Open("file") }
Becomes:
func doSomething() (string, error) { f, err := os.Open("file") if err != nil { return "", err } }
- Two new text objects has been added:
ic
(inner comment) selects the content of the comment, excluding the start/end markers (i.e://
,/*
)ac
(a comment) selects the content of the whole commment block, including markers To use this new feature, make sure you use use the latest version of motion. You can update the tool from Vim via:GoUpdateBinaries
[GH-1779]
- โ Add
:GoPointsTo
to show all variables to which the pointer under the cursor may point to. [GH-1751] - โ Add
:GoReportGitHubIssue
to initialize a new GitHub issue with as much data that our template requests as possible. [GH-1738]
๐ IMPROVEMENTS:
- ๐ Add build tags (with
g:go_build_tags
) to all commands that support it. [GH-1705] - Some command which operate on files (rather than Vim buffers) will now show a
warning if there are unsaved buffers, similar to Vim's
:make
. [GH-1754] - Don't return an error from
:GoGuru
functions when the import path is unknown and scope is unneeded. [GH-1826] - ๐ Performance improvements for the
go.vim
syntax file. [GH-1799] - ๐ Allow
GoDebugBreakpoint
andGoDebugCurrent
highlight groups to be overridden by user configuration. [GH-1850] - ๐ Strip trailing carriage returns from quickfix errors that are parsed manually. [GH-1861].
- Cleanup title of terminal window. [GH-1861].
- โ Add
:GoImpl
is able to complete interfaces by their full import path in addition to the current package name (i.e::GoImpl t *T github.com/BurntSushi/toml.Unmarshaller
is now possible) [GH-1884]
๐ BUG FIXES:
- โก๏ธ Update the correct window's location list after a long running async job completes, even when the user changes their window layout while the job is running. [GH-1734]
- Apply debugger mappings only for Go buffers, and not all buffers. [GH-1696]
- The
gohtmltmpl
filetype will now highlight{{ .. }}
syntax HTML attributes and some other locations. [GH-1790] - ๐ฒ Use the correct logging flag argument for delve. [GH-1809]
- ๐ Fix gocode option string values that would cause gocode settings not to set correctly [GH-1818]
- ๐ Fix Neovim handling of guru output. [GH-1846]
- Execute commands correctly when they are in $GOBIN but not $PATH. [GH-1866]
- Open files correctly with ctrlp. [GH-1878]
- ๐ Fix checking guru binary path [GH-1886]
- โ Add build tags to
:GoDef
if only it's present [GH-1882]
- Add :GoIfErr command together with the