General 11
| Action | Windows / Linux | Mac |
|---|---|---|
| Open SettingsThe dialog's Keymap page shows the active keymap; Go import handling is configured under Go, Imports. | Ctrl+Alt+S | Cmd+, |
| Save AllWith Reformat code switched on in Actions on Save, the default, saving also runs the built-in formatter and gofmt. | Ctrl+S | Cmd+S |
| New in This Directory | Ctrl+Alt+Insert | Ctrl+Option+N |
| New Scratch FileOpens the New Scratch File window, where you pick the language of the file, Go for example. | Ctrl+Alt+Shift+Insert | Cmd+Shift+N |
| Detach editor tabMoves the active tab into a window of its own; drag it back over the main window to re-attach it. | Shift+F4 | Shift+F4 |
| Close active tabCloses only the tab that has the focus; a middle click anywhere on a tab does the same. | Ctrl+F4 | Cmd+W |
| Jump to Navigation BarPuts the focus on the navigation bar; move along the path with the arrow keys and press Enter to open a file. | Alt+Home | Cmd+Up |
| Show file path popupLists the directories on the path of the file being edited; choose one and press Enter to open that location. | Ctrl+Alt+F12 | Cmd+Option+F12 |
| Bigger font in all editorsChanges the code font size globally, and a zoom indicator at the bottom of the editor shows the new size. | Alt+Shift+. | Ctrl+Shift+. |
| Smaller font in all editorsThe Windows key is Alt, Shift and comma; the macOS keymap uses Ctrl in place of Alt. | Alt+Shift+, | Ctrl+Shift+, |
| Open the Switch menuSwitches between schemes, keymaps and viewing modes from one popup; the same key undoes the change. | Ctrl+` | Ctrl+` |
Basic editing 19
| Action | Windows / Linux | Mac |
|---|---|---|
| CutA line cut without a selection is later pasted above the current line, not at the caret. | Ctrl+X | Cmd+X |
| CopyWithout a selection the whole current line is copied as it is. | Ctrl+C | Cmd+C |
| PasteWith several carets, a multi-line clipboard is pasted one line per caret. | Ctrl+V | Cmd+V |
| Paste as Plain TextSkips the smart paste that, for example, adds comment markers to lines pasted into a comment. | Ctrl+Alt+Shift+V | Cmd+Option+Shift+V |
| Paste from HistoryGoLand keeps what you copied earlier; pick an entry in the dialog and choose Paste. | Ctrl+Shift+V | Cmd+Shift+V |
| Copy Paths | Ctrl+Shift+C | Cmd+Shift+C |
| Copy ReferenceBuilds a reference string that includes the line number of the line or symbol at the caret. | Ctrl+Alt+Shift+C | Cmd+Option+Shift+C |
| UndoAlso reverts a refactoring such as Move. | Ctrl+Z | Cmd+Z |
| RedoShift added to the Undo key in both keymaps; Ctrl with Y deletes a line here. | Ctrl+Shift+Z | Cmd+Shift+Z |
| Indent Selection | Tab | Tab |
| Unindent Line or SelectionInside an expanded live template the same key steps back to the previous variable. | Shift+Tab | Shift+Tab |
| Auto-Indent LinesReformats only the indents of the selected fragment, following the code style settings. | Ctrl+Alt+I | Ctrl+Option+I |
| Start New LineOpens an empty line below the current one and puts the caret there. | Shift+Enter | Shift+Return |
| Start new line aboveOpens an empty line above the current one and moves the caret up to it. | Ctrl+Alt+Enter | Cmd+Option+Return |
| Delete LineDeletes the line that holds the caret; the macOS keymap puts it on Cmd and Backspace. | Ctrl+Y | Cmd+Backspace |
| Join LinesPulls the next line up into the caret's line; repeat until everything needed is joined. Same key on a Mac. | Ctrl+Shift+J | Ctrl+Shift+J |
| Duplicate Line or SelectionThe same key is Show Diff in the Commit tool window and Compare Files in the Project tool window. | Ctrl+D | Cmd+D |
| Toggle CaseFlips the selected fragment between upper and lower case; a CamelCase name becomes lower case. | Ctrl+Shift+U | Cmd+Shift+U |
| Unwrap or removeShows the unwrap and remove actions available at the caret, with different background colors for code that stays and code that goes. | Ctrl+Shift+Delete | Cmd+Shift+Delete |
Select text 19
| Action | Windows / Linux | Mac |
|---|---|---|
| Select All | Ctrl+A | Cmd+A |
| Extend selection one character left | Shift+Left | Shift+Left |
| Extend selection one character right | Shift+Right | Shift+Right |
| Extend selection to previous word | Ctrl+Shift+Left | Option+Shift+Left |
| Extend selection to next word | Ctrl+Shift+Right | Option+Shift+Right |
| Extend selection to line start | Shift+Home | Cmd+Shift+Left |
| Extend selection to line end | Shift+End | Cmd+Shift+Right |
| Extend selection one line upIn column selection mode this adds a caret on the line above instead. | Shift+Up | Shift+Up |
| Extend selection one line downIn column selection mode this adds a caret on the line below instead. | Shift+Down | Shift+Down |
| Extend selection to block start | Ctrl+Shift+[ | Cmd+Option+Shift+[ |
| Extend selection to block end | Ctrl+Shift+] | Cmd+Option+Shift+] |
| Extend selection to top of editor | Ctrl+Shift+Page Up | Cmd+Shift+Page Up |
| Extend selection to bottom of editor | Ctrl+Shift+Page Down | Cmd+Shift+Page Down |
| Extend selection one page up | Shift+Page Up | Shift+Page Up |
| Extend selection one page down | Shift+Page Down | Shift+Page Down |
| Extend selection to start of file | Ctrl+Shift+Home | Cmd+Shift+Home |
| Extend selection to end of fileWith column selection mode on and the caret on the first line, this puts a caret on every line. | Ctrl+Shift+End | Cmd+Shift+End |
| Extend SelectionEach press widens the selection by one code construct: symbol, line, method body, method, whole file. | Ctrl+W | Option+Up |
| Shrink SelectionWalks the same steps back, from the whole file down to the single symbol. | Ctrl+Shift+W | Option+Down |
Code folding 10
| Action | Windows / Linux | Mac |
|---|---|---|
| ExpandUnfolds the fragment at the caret, for example one function or a block in curly braces. | Ctrl+Num + | Cmd+Num + |
| CollapseFolds the code fragment the caret is in; these keys use the numeric keypad's plus and minus. | Ctrl+Num - | Cmd+Num - |
| Expand RecursivelyOpens the current fragment together with every region nested inside it. | Ctrl+Alt+Num + | Cmd+Option+Num + |
| Collapse RecursivelyCloses the current fragment and all the regions under it. | Ctrl+Alt+Num - | Cmd+Option+Num - |
| Expand AllUnfolds every fragment in the selection or in the current file. | Ctrl+Shift+Num + | Cmd+Shift+Num + |
| Collapse AllFolds every fragment in the selection or, with nothing selected, in the whole file, for example all methods. | Ctrl+Shift+Num - | Cmd+Shift+Num - |
| Fold SelectionTurns the selected code into a foldable fragment; the same key expands and collapses a custom folding region. | Ctrl+. | Cmd+. |
| Expand to levelA sequence: the chord, then a digit from 1 to 5 for how many nesting levels of the current fragment to open. | Ctrl+Num *then1-5 | Cmd+Num *then1-5 |
| Expand all to levelApplies the chosen nesting level to every collapsed fragment of the file; the Mac chord uses Option where Windows uses Shift. | Ctrl+Shift+Num *then1-5 | Cmd+Option+Num *then1-5 |
| Go to custom folding regionNavigates to a region that was marked as a custom folding region with dedicated comments. | Ctrl+Alt+. | Cmd+Option+. |
Multiple carets and selection ranges 11
Adding a caret on the line above or below is a gesture rather than a chord: two quick presses of Ctrl (Option on a Mac), keeping the key down after the second, then an arrow key. With virtual space switched on, each new caret sits exactly above or below the current one.
| Action | Windows / Linux | Mac |
|---|---|---|
| Add or remove a caretClick where the extra caret should go; clicking an existing caret removes it, except the last one. | Alt+Click | Option+Click |
| Toggle Column Selection ModeWhile the mode is on, a Column indicator appears in the status bar. | Alt+Shift+Insert | Cmd+Shift+8 |
| Clone Caret AboveTap the modifier twice and keep it down on the second tap, then press the Up arrow. | CtrlthenCtrl+Up | OptionthenOption+Up |
| Clone Caret BelowTap the modifier twice and keep it down on the second tap, then press the Down arrow. | CtrlthenCtrl+Down | OptionthenOption+Down |
| Add carets to ends of selected linesSelect a block first; every line of it gets a caret at its end. | Alt+Shift+G | Option+Shift+G |
| Select next occurrenceMatching is case-sensitive; after the second hit, F3 skips an occurrence and selects the following one. | Alt+J | Ctrl+G |
| Select All OccurrencesSelects every case-sensitive match of the word or range in the document at once. | Ctrl+Alt+Shift+J | Cmd+Ctrl+G |
| Deselect last occurrenceDrops the selection added most recently and keeps the earlier ones. | Alt+Shift+J | Ctrl+Shift+G |
| Rectangular selection to click pointPut the caret at one corner, then use this click at the diagonally opposite corner. | Alt+Shift+Middle-click | Option+Shift+Middle-click |
| Drag a rectangular selectionNeeds column selection mode to be off. | Alt+Shift+Click | Option+Shift+Click |
| Drag additional rectangular selectionsEach drag over another part of the code adds one more rectangle to the selection. | Ctrl+Alt+Shift+Click | Cmd+Option+Shift+Click |
Coding assistance 25
With XWin, the keymap JetBrains provides for Linux, Surround With leaves Ctrl + Alt + T for Ctrl + Alt + Shift + B.
| Action | Windows / Linux | Mac |
|---|---|---|
| Basic CompletionOn a declaration name, a second press adds types from module dependencies and a third the whole project. | Ctrl+Space | Ctrl+Space |
| Type-Matching CompletionNarrows the suggestion list to values that suit the current context. | Ctrl+Shift+Space | Ctrl+Shift+Space |
| Second Basic Completion | Ctrl+Alt+Space | Ctrl+Option+Space |
| Complete Current StatementMakes the current construct syntactically correct, for example by balancing its parentheses. | Ctrl+Shift+Enter | Cmd+Shift+Return |
| Parameter InfoReopens the parameter popup when it has closed or is set not to appear automatically. | Ctrl+P | Cmd+P |
| Quick DocumentationShows the documentation in a popup; pressing twice moves it to the Documentation tool window. F1 on a Mac. | Ctrl+Q | F1 |
| External DocumentationOpens the documentation for the symbol in a web browser; the action goes to pkg.go.dev. | Shift+F1 | Shift+F1 |
| Type InfoDisplays the type of the expression or code element at the caret. | Ctrl+Shift+P | Ctrl+Shift+P |
| Context InfoTells you which element the caret is in when its declaration is not visible; the Mac key is a different chord. | Alt+Q | Ctrl+Shift+Q |
| GenerateIn a Go file the popup also creates tests: an empty test file or tests for a function, file or package. | Alt+Insert | Cmd+N |
| Implement MethodsThe help uses it to create a type: choose Create Type and name the interface the new type has to implement. | Ctrl+I | Ctrl+I |
| Surround WithWraps the selected fragment in a construct chosen from a popup, custom folding comments included. | Ctrl+Alt+T | Cmd+Option+T |
| Insert Live TemplateOpens the list of live templates to pick from, instead of typing an abbreviation and pressing Tab. | Ctrl+J | Cmd+J |
| Surround with Live TemplateWraps the selected code in a template taken from the suggestion list. | Ctrl+Alt+J | Cmd+Option+J |
| Reformat CodeRuns GoLand's own formatter, which, unlike gofmt, copes with incomplete code and can be applied to a selected block. | Ctrl+Alt+L | Cmd+Option+L |
| Reformat File dialogOpens a dialog with an Optimize imports checkbox; once it is selected, Reformat Code tidies the imports in this project as well. | Ctrl+Alt+Shift+L | Cmd+Option+Shift+L |
| Optimize ImportsCleans up the import block of the current file; the macOS keymap keeps Ctrl and swaps Alt for Option. | Ctrl+Alt+O | Ctrl+Option+O |
| Move Statement UpCarries the whole statement at the caret upwards with a syntax check; where the move is not allowed, the action is disabled. | Ctrl+Shift+Up | Cmd+Shift+Up |
| Move Statement Down | Ctrl+Shift+Down | Cmd+Shift+Down |
| Move Element Left | Ctrl+Alt+Shift+Left | Cmd+Option+Shift+Left |
| Move Element RightThe keymap page labels this row Move Statement Right; the key is the counterpart of Move Element Left. | Ctrl+Alt+Shift+Right | Cmd+Option+Shift+Right |
| Move Line UpMoves the current line only, where Move Statement carries a whole statement. | Alt+Shift+Up | Option+Shift+Up |
| Move Line Down | Alt+Shift+Down | Option+Shift+Down |
| Toggle line commentPress it again on a commented line to remove the comment. | Ctrl+/ | Cmd+/ |
| Toggle block commentThe Mac binding uses Option where the Windows binding uses Shift. | Ctrl+Shift+/ | Cmd+Option+/ |
Find everything 13
| Action | Windows / Linux | Mac |
|---|---|---|
| Search EverywherePress Shift twice; the window first lists recent files and finds files, types, symbols, actions and settings. | ShiftthenShift | ShiftthenShift |
| Find ActionType a command or setting name and press Enter to run it; Alt and Enter on a result assigns a shortcut. | Ctrl+Shift+A | Cmd+Shift+A |
| Go to TypeOpens the Search Everywhere window with its scope already narrowed to types. | Ctrl+N | Cmd+O |
| Go to FileFinds a file or directory by name and accepts CamelCase and snake_case abbreviations. | Ctrl+Shift+N | Cmd+Shift+O |
| Go to Symbol | Ctrl+Alt+Shift+N | Cmd+Option+O |
| File StructureShows the elements of the open file in a popup that narrows as you type. | Ctrl+F12 | Cmd+F12 |
| FindSearches within the open file; pressed in the Documentation tool window, it searches the documentation text. | Ctrl+F | Cmd+F |
| Find Next | F3 | Cmd+G |
| Find Previous | Shift+F3 | Cmd+Shift+G |
| Next occurrence of word at caretHighlights the word at the caret and jumps to its next occurrence; the predefined macOS keymap has no key for it. | Ctrl+F3 | — |
| ReplaceFind and replace within the current file. | Ctrl+R | Cmd+R |
| Find in FilesA string highlighted in the editor is placed in the search field automatically. | Ctrl+Shift+F | Cmd+Shift+F |
| Replace in FilesOpens the Replace in Path dialog for a project-wide search and replace. | Ctrl+Shift+R | Cmd+Shift+R |
Code analysis 5
| Action | Windows / Linux | Mac |
|---|---|---|
| Show Context ActionsLists quick-fixes and intention actions that apply at the caret; a preview of the result opens automatically. | Alt+Enter | Option+Return |
| Error DescriptionShows a description of the error or warning the caret is on. | Ctrl+F1 | Cmd+F1 |
| Next Highlighted ErrorMoves the caret to the following problem that code analysis has highlighted in the file. | F2 | F2 |
| Previous Highlighted Error | Shift+F2 | Shift+F2 |
| Run Inspection by Name | Ctrl+Alt+Shift+I | Cmd+Option+Shift+I |
Run and debug 28
Linux users who pick XWin in the help's keymap selector get the digit 9 instead of F9 in the run-to-cursor keys: Alt + Shift + 9 for Run to Cursor (Alt + F9 here) and Ctrl + Alt + 9 for Force Run to Cursor (Ctrl + Alt + F9 here). The left column shows the Windows keymap.
| Action | Windows / Linux | Mac |
|---|---|---|
| Run AnythingTwo taps of Ctrl in both keymaps. | CtrlthenCtrl | CtrlthenCtrl |
| Build Project | Ctrl+F9 | Cmd+F9 |
| Rebuild | Ctrl+Shift+F9 | Cmd+Shift+F9 |
| RunStarts the run configuration selected in the Run widget; on a Mac it is Ctrl with R. | Shift+F10 | Ctrl+R |
| Choose configuration and runOpens a menu of run configurations to launch one of them. | Alt+Shift+F10 | Ctrl+Option+R |
| StopTerminates the process at once; with two or more running, you choose which one. | Ctrl+F2 | Cmd+F2 |
| Stop Background Processes | Ctrl+Shift+F2 | Cmd+Shift+F2 |
| RerunStops the running application and starts it again; on the Test Runner tab it reruns all tests of the session. | Ctrl+F5 | Cmd+R |
| DebugStarts a debug session for the configuration selected in the Run widget. | Shift+F9 | Ctrl+D |
| Choose configuration and debugPick an existing run/debug configuration from the menu and press Enter to debug it. | Alt+Shift+F9 | Ctrl+Option+D |
| Attach to Process | Ctrl+Alt+F5 | Option+Shift+F5 |
| Resume ProgramContinues execution of a program that the debugger has paused. | F9 | Cmd+Option+R |
| Step OverRuns to the next line of the current method without entering the methods called on the way. | F8 | F8 |
| Force Step Over | Alt+Shift+F8 | Option+Shift+F8 |
| Step IntoEnters the method called at the current execution point. | F7 | F7 |
| Smart Step IntoLets you pick which method call on the line to enter; confirm the choice with Enter or F7. | Shift+F7 | Shift+F7 |
| Force Step Into | Alt+Shift+F7 | Option+Shift+F7 |
| Step OutLeaves the current method and stops at the line executed right after it. | Shift+F8 | Shift+F8 |
| Run to CursorResumes execution and pauses again when it reaches the line with the caret. | Alt+F9 | Option+F9 |
| Force Run to Cursor | Ctrl+Alt+F9 | Cmd+Option+F9 |
| Show Execution PointHighlights the current execution point in the editor and shows its stack frame. | Alt+F10 | Option+F10 |
| Evaluate ExpressionOpens the evaluation dialog; select a variable or expression first to have it filled in. | Alt+F8 | Option+F8 |
| Quick Evaluate ExpressionSelect an expression in the code, or only the portion of it that matters, before pressing the key. | Ctrl+Alt+F8 | Cmd+Option+F8 |
| Toggle Line BreakpointSets or removes a breakpoint on the executable line at the caret. | Ctrl+F8 | Cmd+F8 |
| Toggle temporary breakpoint | Ctrl+Alt+Shift+F8 | Cmd+Option+Shift+F8 |
| View BreakpointsOpens the Breakpoints dialog, where Go error breakpoints are set and breakpoints are grouped or removed. | Ctrl+Shift+F8 | Cmd+Shift+F8 |
| Edit BreakpointListed by JetBrains on the same key as View Breakpoints. | Ctrl+Shift+F8 | Cmd+Shift+F8 |
| Set ValueChanges the value of the variable selected in the debugger, to test how the program behaves with other data. | F2 | F2 |
Testing 5
| Action | Windows / Linux | Mac |
|---|---|---|
| Go to Test or Test SubjectJumps between a test and its subject; on the way to a test, a popup may list tests or offer a new one. | Ctrl+Shift+T | Cmd+Shift+T |
| Run tests at caretIn a test file it runs every test of the file; with the caret on one test, only that test. | Ctrl+Shift+F10 | Ctrl+Shift+R |
| Expand test treeOn the Test Runner tab, opens all nodes of the test tree; needs the plus key of the numeric keypad. | Ctrl+Num + | Cmd+Num + |
| Collapse test treeCloses all nodes of the test tree on the Test Runner tab. | Ctrl+Num - | Cmd+Num - |
| Manage Coverage ReportsOpens the list of coverage suites, where you tick the ones whose data the IDE should display. | Ctrl+Alt+F6 | Cmd+Option+F6 |
Refactorings 12
| Action | Windows / Linux | Mac |
|---|---|---|
| Refactor ThisA predefined quick list of the refactorings; on a Mac it is Ctrl with T. | Ctrl+Alt+Shift+T | Ctrl+T |
| RenameIdentical in both keymaps; in the Project tool window it renames the selected item. | Shift+F6 | Shift+F6 |
| Change Signature | Ctrl+F6 | Cmd+F6 |
| Inline | Ctrl+Alt+N | Cmd+Option+N |
| MoveMoves the selected declaration to another package or file; the dialog lists declarations that can go with it. | F6 | F6 |
| CopyCreates a copy of a file, directory or package in a different directory or package. | F5 | F5 |
| Extract Method | Ctrl+Alt+M | Cmd+Option+M |
| Extract ConstantTurns the selected expression into a constant; by default the refactoring is done in place, without a dialog. | Ctrl+Alt+C | Cmd+Option+C |
| Introduce Variable | Ctrl+Alt+V | Cmd+Option+V |
| Introduce Field | Ctrl+Alt+F | Cmd+Option+F |
| Introduce Parameter | Ctrl+Alt+P | Cmd+Option+P |
| Safe Delete | Alt+Delete | Cmd+Delete |
Version control 9
| Action | Windows / Linux | Mac |
|---|---|---|
| VCS Operations PopupGathers the Git commands in a single popup, which the help also names the Git Operations Popup. | Alt+` | Ctrl+V |
| CommitOpens the Commit tool window and selects the entire active changelist. | Ctrl+K | Cmd+K |
| Commit and PushPushes to the remote repository right after committing; the commit checks are still done before the commit. | Ctrl+Alt+K | Cmd+Option+K |
| Stage fileWorks on the file selected in the Commit tool window and stages all of it. | Ctrl+Alt+A | Cmd+Option+A |
| Update Project | Ctrl+T | Cmd+T |
| PushOpens the Push dialog; Shift is added to the Commit key in both keymaps. | Ctrl+Shift+K | Cmd+Shift+K |
| Rollback | Ctrl+Alt+Z | Cmd+Option+Z |
| Next ChangeIn a file under version control, moves the caret to the following changed fragment. | Ctrl+Alt+Shift+Down | Ctrl+Option+Shift+Down |
| Previous ChangeOn a Mac both change keys are Ctrl, Option and Shift with an arrow. | Ctrl+Alt+Shift+Up | Ctrl+Option+Shift+Up |
Diff viewer 8
| Action | Windows / Linux | Mac |
|---|---|---|
| Show DiffIn the Commit tool window, compares the selected file with its repository version. | Ctrl+D | Cmd+D |
| Compare FilesWith two files selected in the Project tool window, opens them in a new Diff Viewer tab. | Ctrl+D | Cmd+D |
| Next DifferenceAt the last difference, another press offers to continue with the next locally modified file. | F7 | F7 |
| Previous Difference | Shift+F7 | Shift+F7 |
| Accept Left Side | Ctrl+Alt+R | Cmd+Ctrl+Right |
| Accept Right Side | Ctrl+Alt+A | Cmd+Ctrl+Left |
| Select Opposite Diff PaneMoves the caret between the left and right panes; the active pane is the one with the caret. | Ctrl+Shift+Tab | Ctrl+Shift+Tab |
| Show diff settings popupOpens a menu of the most commonly used diff commands. | Ctrl+Shift+D | Cmd+Shift+D |
Tool windows 24
| Action | Windows / Linux | Mac |
|---|---|---|
| Show Project windowThe Alt and digit keys of this group become Cmd and digit in the macOS keymap. | Alt+1 | Cmd+1 |
| Show Bookmarks windowLists all bookmarks in their lists, together with the breakpoints of the project. | Alt+2 | Cmd+2 |
| Show Find window | Alt+3 | Cmd+3 |
| Show Run window | Alt+4 | Cmd+4 |
| Show Debug windowReopens the Debug tool window if it was closed during a session. | Alt+5 | Cmd+5 |
| Show Problems window | Alt+6 | Cmd+6 |
| Show Structure window | Alt+7 | Cmd+7 |
| Show Services window | Alt+8 | Cmd+8 |
| Show Version Control window | Alt+9 | Cmd+9 |
| Show Commit window | Alt+0 | Cmd+0 |
| Show Terminal windowPressed inside the terminal, it closes the tool window and returns to the editor. | Alt+F12 | Option+F12 |
| Hide Active Tool Window | Shift+Esc | Shift+Esc |
| Hide All Tool WindowsLeaves only the active editor on screen, which the help calls maximizing the editor pane. | Ctrl+Shift+F12 | Cmd+Shift+F12 |
| Return to last tool windowSends the focus from the editor to whichever tool window was active before. | F12 | F12 |
| Stretch to LeftLeft and Right resize a vertical tool window; the macOS keymap uses Ctrl and Option without Shift. | Ctrl+Alt+Shift+Left | Ctrl+Option+Left |
| Stretch to Right | Ctrl+Alt+Shift+Right | Ctrl+Option+Right |
| Stretch to TopUp and Down resize a horizontal tool window. | Ctrl+Alt+Shift+Up | Ctrl+Option+Up |
| Stretch to Bottom | Ctrl+Alt+Shift+Down | Ctrl+Option+Down |
| Maximize Tool WindowStretches the active tool window to its maximum width or height. | Ctrl+Shift+' | Cmd+Shift+' |
| Restore default layoutThe menu equivalent is Window, Layouts, Default; the key is the same in both keymaps. | Shift+F12 | Shift+F12 |
| Jump to SourceOpens the file of the item selected in a tool window, such as a search result, a code issue or a bookmark. | F4 | Cmd+Down |
| Open in Right SplitIn the Project tool window, opens the selected file in the right half of a split editor. | Shift+Enter | Shift+Return |
| Close Run tabBesides closing the tab, it terminates the process that was running in it. | Ctrl+Shift+F4 | Ctrl+Shift+F4 |
| New terminal tabStarts another terminal session in a tab of its own; in the editor the Windows key is Go to Test. | Ctrl+Shift+T | Cmd+T |
No row on this page matches that filter.
Notes
Go-specific uses of shared keys
Ctrl + Shift + T jumps between a function and its test, and may offer to create a new test; Alt + Insert generates an empty test file or tests for a function, a file or a package. Ctrl + B on an identifier goes to its declaration, on a name inside a comment to the package-level declaration it refers to, and in a go.work file to the module listed there. Alt + F7 finds usages — for a method, usages of the interface method; Ctrl + Alt + Shift + F7 searches for the current method instead. Ctrl + U navigates to the interface, or to all the types that implement an interface. Ctrl + Shift + Enter completes the statement being typed and, in structs, slices and other composite literals, inserts the trailing comma Go requires. Ctrl + Shift + N opens any file and Ctrl + E lists recent ones; Ctrl + F12 shows the current file's structure as a popup.
Fixing and formatting
Alt + Enter lists the quick-fixes and intention actions for the code at the caret, with a preview of what each would change. Ctrl + Alt + L runs GoLand's built-in formatter, which also works on incomplete code and on a selected block; gofmt itself runs on save together with the built-in formatter while Reformat code is enabled in Actions on Save, and the help gives Go Fmt File, Goimports File, Go Generate File and Go Vet File as commands under Tools › Go Tools and prints no key for them. Ctrl + Alt + O optimizes imports. Ctrl + / comments a line, Ctrl + D duplicates one, F2 steps to the next highlighted error, and Shift + F6 renames a symbol together with the references to it.
Running tests and programs
Ctrl + Shift + F10 runs what is at the caret: in a test file all of its tests, on a single test only that one. Shift + F10 launches the configuration selected in the Run widget, Alt + Shift + F10 lets you pick another one, and Ctrl + F5 reruns. On a Mac these are Ctrl + Shift + R, Ctrl + R, Ctrl + Option + R and Cmd + R. After a run with failures, Ctrl + Alt + Down and Ctrl + Alt + Up step forward and back through the failed tests on the Test Runner tab, and Ctrl + F2 stops the test process. Shift, Shift searches everything including actions and settings, while Ctrl + Shift + A locates a named action — such as Go Generate File, for which the help prints no key.
Questions
Is there a GoLand shortcut for go fmt?
The help prints none: it gives Go Fmt File and Go Fmt Project as commands under Tools › Go Tools, so check Settings › Keymap for a binding in your version. Ctrl + Alt + L (Cmd + Option + L on a Mac) runs GoLand's built-in formatter, and with Reformat code enabled in Actions on Save, which is the default, Ctrl + S runs both the built-in formatter and gofmt.
How do I jump between a Go function and its test?
Press Ctrl + Shift + T (Cmd + Shift + T on a Mac) with the caret on the function or on the test. Going to the test subject is immediate; going to a test may show a popup to choose a test or create a new one. Alt + Insert (Cmd + N) generates test files directly.
Which key runs the test under the caret?
Ctrl + Shift + F10, or Ctrl + Shift + R on a Mac. With the caret elsewhere in a test file it runs every test in that file, and on a folder selected in the Project tool window it runs the tests of the folder. Ctrl + F5 (Cmd + R) reruns the session.
Why does Find Usages on a Go method list interface usages?
In GoLand Alt + F7 looks for usages of the interface method. To search for usages of the current method only, press Ctrl + Alt + Shift + F7 (Cmd + Option + Shift + F7 on a Mac), which opens the Find Usages dialog.
Which GoLand keys change on Linux?
The help has no separate Linux table, but its keymap selector includes XWin, and the shortcut data behind GoLand's topic pages shows where XWin departs from the Windows column: Manage Coverage Reports moves to Ctrl + Alt + 6, the file path popup to Ctrl + Alt + Shift + 2 and Surround With to Ctrl + Alt + Shift + B, while several debugger and usage keys trade their function key for a digit — Ctrl + Alt + 8 for Quick Evaluate Expression, Alt + Shift + 9 and Ctrl + Alt + 9 for Run to Cursor and Force Run to Cursor, Ctrl + Alt + 7 for Show Usages and Ctrl + Alt + Shift + 7 for the Find Usages dialog. GNOME and KDE keymaps are available as plugins.
Sources and checks
- JetBrains — GoLand 2026.2 Help: Predefined Windows keymap Windows / Linux column of the main list
- JetBrains — GoLand 2026.2 Help: Predefined macOS keymap Mac column of the main list
- JetBrains — GoLand 2026.2 Help: Editor basics (Windows and macOS keymaps) Close tab, Switch menu, Quick Definition
- JetBrains — GoLand 2026.2 Help: File navigation (Windows and macOS keymaps) Navigation bar, file path popup
- JetBrains — GoLand 2026.2 Help: Write and edit source code (Windows and macOS keymaps) Implement Methods, Unwrap, folding levels
- JetBrains — GoLand 2026.2 Help: Live templates (Windows and macOS keymaps) Insert and surround with live templates
24 more source pages
- JetBrains — GoLand 2026.2 Help: Auto import (Windows and macOS keymaps) Optimize Imports, Reformat File dialog
- JetBrains — GoLand 2026.2 Help: Code reference information (Windows and macOS keymaps) Type Info, External Documentation
- JetBrains — GoLand 2026.2 Help: Source code navigation (Windows and macOS keymaps) Context Info
- JetBrains — GoLand 2026.2 Help: Recent files and changes (Windows and macOS keymaps) Recent Locations
- JetBrains — GoLand 2026.2 Help: Search everywhere (Windows and macOS keymaps) Go to Type
- JetBrains — GoLand 2026.2 Help: Search for usages (Windows and macOS keymaps) Find Usages dialog, Find Usages in File
- JetBrains — GoLand 2026.2 Help: Source code hierarchy (Windows and macOS keymaps) Type and call hierarchy
- JetBrains — GoLand 2026.2 Help: Code completion (Windows and macOS keymaps) Method Hierarchy
- JetBrains — GoLand 2026.2 Help: Run tool window (Windows and macOS keymaps) Rerun, Close Run tab
- JetBrains — GoLand 2026.2 Help: Examine suspended program (Windows and macOS keymaps) Set Value
- JetBrains — GoLand 2026.2 Help: Create tests (Windows and macOS keymaps) Go to Test, generating tests
- JetBrains — GoLand 2026.2 Help: Run tests (Windows and macOS keymaps) Run tests at caret
- JetBrains — GoLand 2026.2 Help: Test Runner tab (Windows and macOS keymaps) Test tree keys
- JetBrains — GoLand 2026.2 Help: Code coverage (Windows and macOS keymaps) Manage Coverage Reports
- JetBrains — GoLand 2026.2 Help: Extract constant (Windows and macOS keymaps) Extract Constant
- JetBrains — GoLand 2026.2 Help: Copy and move refactorings (Windows and macOS keymaps) Copy
- JetBrains — GoLand 2026.2 Help: Commit and push changes to Git repository (Windows and macOS keymaps) Commit and Push, Stage file
- JetBrains — GoLand 2026.2 Help: Arrange tool windows (Windows and macOS keymaps) Maximize Tool Window, default layout
- JetBrains — GoLand 2026.2 Help: Tool windows (Windows and macOS keymaps) Jump to Source
- JetBrains — GoLand 2026.2 Help: Project tool window (Windows and macOS keymaps) Open in Right Split
- JetBrains — GoLand 2026.2 Help: Terminal (Windows and macOS keymaps) New terminal tab
- JetBrains — GoLand 2026.2 Help: Multiple cursors and selection ranges (Windows and macOS keymaps) How the Clone Caret double press works
- JetBrains — GoLand 2026.2 Help: Step through the program (XWin keymap for Linux selected) Linux differences in the debugger keys
- JetBrains — GoLand 2026.2 Help: Write and edit source code (XWin keymap for Linux selected) Linux difference for Surround With
Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.
Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.