How can I set a shortcut in Atom editor for Go To Definition using go-plus. Thanks for your help in advance.
Simply hit **ctrl + ** ( ctrl + backtick`) and you will get a cheatsheet on your screen immediately. Run apm install atom-shortcuts to install the package.
CMD - R to jump to a function/method in the current ,editor. Alt - CMD - Down to go to declaration.
Autosave package This package is disabled by default and can be enabled via the autosave. enabled config setting or from the Autosave section of the Settings view (OS X: cmd-,, Windows & Linux: Ctrl-,).
By default, the go-plus package uses Alt+Cmd+G to trigger the Go To Definition binding (as can be seen here). This binding will only work in files that use the Go grammar. Since Cmd is only available on Mac OS X, I don't know what keybinding other operating systems will use by default.
To redefine the keybinding, do the following:
golang:godef
keybinding.This will open your keymap.cson
file. Go to the end of the file and paste the copied content:
'atom-text-editor[data-grammar="source go"]:not(.mini)':
'alt-cmd-g': 'golang:godef'
Edit the keybinding to your liking and safe the file.
To verify the new keybinding, open the Key Binding Resolver view by selecting the Packages > Key Binding Resolver > Toggle menu entry. Open a Go file and press the keybinding you assigned, then watch the Key Binding Resolver view to see any conflicts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With