vim-go v1.8 Release Notes
Release Date: 2016-07-31 // almost 8 years ago-
๐ FEATURES:
- 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 appliessnake_case
orcamelCase
conversion. Together with:GoAddTags
it givesvim-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
org: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] - โ Add new
errp
snippet to expand anif err != nil { panic() }
clause [GH-926] - 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 withlet g:go_template_file = "foo.go"
and putting the file under thetemplates/
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 commands::GoAutoTypeInfoToggle
,:GoFmtAutoSaveToggle
,:GoAsmFmtAutoSaveToggle
,:GoMetalinterAutoSaveToggle
,:GoTemplateAutoCreateToggle
[GH-945]
๐ IMPROVEMENTS:
:GoDoc
accepts arguments now which are passed directly togodoc
. So usages like:GoDoc flag
works again (it was changed in previous versions [GH-894]:GoDef
works now for modified files as well [GH-910]- Internal: pass filename to the
--srcdir
flag to enable upcominggoimports
features [GH-957] - Internal: fix indentations on all files to 2-spaces/no tabs. This is now the default vim-go style across all VimL files [GH-915]
- Internal: autocmd settings can be now dynamically enabled/disabled [GH-939]
- Internal: automatically detect
GOPATH
for :GoInstall [GH-980] - 0๏ธโฃ Internal: shell executions uses now by default
sh
and then resets it back to the user preference. [GH-967] - ๐ Syntax: improved syntax highglighting performance for methods, fields, structs and interface type declarations [GH-917]
- ๐ Syntax: moved
:GoCoverage
highlight definition into go's syntax file for more customizability [GH-962]
๐ BUG FIXES:
- Escape
#
characters when opening URL's, as it's handled as alternative file in vim [GH-895] - ๐ Fix typos in
doc/vim-go.txt
about usages of syntax highglightings [GH-897] - ๐ Fix
:GoCoverage
not running for Neovim [GH-899] - ๐ Fix
:GoFmt
not picking up-srcdir
if the command was set to usegoimports
[GH-904] - ๐ Fix
:GoTestCompile
to not leave behind artifacts if the cwd and the test files's directory do not match [GH-909] - ๐ Fix
:GoDocBrowser
to not fail if godoc doesn't exist [GH-920] - ๐ Fix
:GoFmt
to not change the permissions of saved file. Now original file permissions are restored [GH-922]
BACKWARDS INCOMPATIBILITIES:
g:go_highlight_structs
andg:go_highlight_interface
are removed in favor ofg:go_highlight_types
[GH-917]
- New