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 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]
    • โž• Add new errp snippet to expand an if 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 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 commands: :GoAutoTypeInfoToggle, :GoFmtAutoSaveToggle, :GoAsmFmtAutoSaveToggle, :GoMetalinterAutoSaveToggle, :GoTemplateAutoCreateToggle [GH-945]

    ๐Ÿ‘Œ IMPROVEMENTS:

    • :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]
    • :GoDef works now for modified files as well [GH-910]
    • Internal: pass filename to the --srcdir flag to enable upcoming goimports 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 use goimports [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 and g:go_highlight_interface are removed in favor of g:go_highlight_types [GH-917]