Show Menu
Cheatography

GoLand 2018.1 (Mac) Keyboard Shortcuts by

Tool Windows / Popups

Project
⌘1
Version Control
⌘9
Run
⌘4
Debug
⌘5
Terminal
⌥F12
Editor
Esc
Navigation Bar
⌘↑
Hide all tool windows
⇧⌘F12
Accessing a tool window via its shortcut moves the input focus to it, so you can use all keyboard commands in its context. When you need to go back to the editor, press ⎋ (Esc).

Code Completion

Basic completion
⌃Space
Smart Completion
⌃⇧Space
See suggested parameters for method­/fu­nction
⌘P

Quick Popups

Docume­ntation
F1
Quick definition
⌥Space
Show usages
⌥⌘F7
Show implem­ent­ation
⌥⌘B

Refact­oring

Rename
⇧F6
Extract variable
⌥⌘V
Extract constant
⌥⌘C
Extract function
⌥⌘M
Inline
⌥⌘N
Copy
F5
Move
F6
Refactor this
⌃T

Code Style and Formatting

Reformat code
⌥⌘L
Auto-i­ndent lines
⌃⌥I
Optimize imports
⌃⌥O
Go fmt file
⌥⇧⌘F
Go fmt project
⌥⇧⌘P
 

Editor Basics

Move the current line of code
⇧⌘↑ ⇧⌘↓
Duplicate a line of code
⌘D
Remove a line of code
⌘⌫
Comment or uncomment a line of code
⌘/
Comment a block of code
⌥⌘/
Find in the currently opened file
⌘F
Find and replace in the current file
⌘R
Next/p­revious occurrence
⌘G ⇧⌘G
Navigate between opened tabs
⇧⌘] ⇧⌘[
Navigate back/f­orward
⌘[ ⌘]
Expand or collapse a code block in the editor
⌘+ ⌘-
Create new...
⌘N
Surround with
⌥⌘T
Highlight usages of a symbol
⌘F7
Expand­/shrink a selection based on grammar
⌥↑ ⌥↓
Select­/de­select any piece of code (multiple selections allowed)
⌃G

Debug

Toggle breakpoint
⌘F8
Disable breakpoint
Click on the gutter while holding Alt
Change breakpoint details
⇧⌘F8
Step into (debug mode)
F7
Step over (debug mode)
F8
Step out (debug mode)
⇧F8
Resume (debug mode)
⌥⌘R
Evaluate expression tool (debug mode)
⌥F8
 

Inspec­tions

Go to next/p­revious problem
F2 ⇧F2
Choose Quick Fix
⌥⏎
Inspec­tions are built-in static code analysis tools that help you find probable bugs, detect perfor­mance issues, and improve the overall code structure.

Navigation

File Structure Popup
⌘F12
Recent Files Popup
⌘E
Select In Popup
⌥F1
Navigate to Type
⌘O
Navigate to File
⇧⌘O
Navigate to Symbol
⌥⌘O
Navigate to type declar­ation
⇧⌘B
Navigate to declar­ation
⌘B
Navigate to type hierarchy
⌃H
Navigate to implem­ent­ati­on(s)
⌥⌘B
Navigate to super method
⌘U
Navigate to test
⇧⌘T
Search everywhere
Double Shift

Build and Run

Run
⌃R
Debug
⌃D
Once you've created a Run/Debug config­uration by selecting Run | Edit Config­ura­tions from the main menu, you are able to run and debug your code.

Finding Usages

Find Usages
⌥F7
Set custom options for the Find Usages algorithm
⌥⇧⌘F7
Find in Path (if looking for plain text)
⌘F
Find Usages helps you quickly find all pieces of code refere­ncing the symbol at the caret (cursor).

Version Control

VCS Operations Popup
⌃V
Version Control Tool Window
⌘9
Commit changes
⌘K
Update project
⌘T
Push commits
⇧⌘K
 

Comments

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.