Skip to content

Instantly share code, notes, and snippets.

@winnab
Last active March 26, 2018 09:14
Show Gist options
  • Save winnab/2c5608fe4034b2276f2a8664dbe9c9f0 to your computer and use it in GitHub Desktop.
Save winnab/2c5608fe4034b2276f2a8664dbe9c9f0 to your computer and use it in GitHub Desktop.
Gogland useful shortcuts

From another project

Navigation

  • Go to definition: cmd + B
  • Go to list of all method declarations: cmd + opt + B
  • Line up and down: cmd + shift + up or down arrow
  • Expansive text selection: option + up arrow (as many times as needed)
  • cmd+[: go back
  • cmd+]: go forward
  • alt+F7: find usages of the identifier under the cursor.
  • cmd+shift+f: search all the files in the project. (You can also search a directory by right clicking on the direction from the project view and choosing "Find in Path...".)
  • shift+F6: rename the identifier under the cursor. (Press escape unless you want to overtype the whole identifier.)
  • cmd+7: View the structure of the current file which displays types, methods, and so forth. There is a button to sort the contents alphabetically which is useful for large files.
  • cmd+1: View the project files.
  • cmd+/: comment the current line (or the current selection).
  • cmd+d: duplicate the current line.
  • Live templates. E.g. type meth in a Go file and then choose the live template by hitting tab to insert a method. Other live templates can be found under preferences.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment