Skip to content

Instantly share code, notes, and snippets.

@lambda-mike
Last active June 11, 2020 08:36
Show Gist options
  • Save lambda-mike/2ecc58c461cf70c60d40eee961977922 to your computer and use it in GitHub Desktop.
Save lambda-mike/2ecc58c461cf70c60d40eee961977922 to your computer and use it in GitHub Desktop.
go-vim cheatsheet

go-vim cheatsheet

:GoAlternate go to tests and back (toggle)

:GoBuild

:GoCoverageToggle show/hide test coverage

:GoDef gd / Ctrl-t

:GoDescribe show calls and definition

:GoDoc print doc for the function hit K

:GoFreevars show free variables

:GoInfo show type declaration in status bar

:GoInstall

:GoLint

:GoMetaLinter calls everything, fmt, lint, vet, etc.

:GoPlay create snippet in golang.play.org and copy to clipboard

:GoRename newname rename thing under cursor

:GoRun

:GoSameIds show the same id in code highlighted

:GoTest

:GoTestCompile only compiles tests

:GoTestFunc run only test under cursor

]] Next func

[[ Prev func

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment