CLion keyboard shortcuts for Windows, Linux and Mac

CLion's default shortcuts from the CLion 2026.2 help: the keymap the help calls Windows in the first column and the predefined macOS keymap in the second, gathered from the help's shortcuts-by-category pages plus topic pages for C and C++ work, such as F10 for Go to Header/Source and Ctrl + F9 for Build. The help has no separate Linux keymap and does not state that the Windows one applies there. Other predefined keymaps and commands without a default key, such as Reload CMake Project, are left out.

261 shortcuts in 18 sections. Checked row by row against JetBrains on . Edited by Jay.

General 19

The first column is the keymap the help calls Windows; its keymap selector has no Linux entry, and keymaps for GNOME and KDE are plugins. On Ubuntu the help lists defaults that collide with system shortcuts: Ctrl + Alt + L locks the screen, Ctrl + Alt + T opens a terminal, Alt + F7 moves the window.

ActionWindows / LinuxMac
Search everywhereTap Shift twice; one box then searches files, classes, symbols, actions, tool windows and settings.ShiftthenShiftShiftthenShift
Run AnythingTap Ctrl twice on either system, then type the name of a run configuration or a command to launch it.CtrlthenCtrlCtrlthenCtrl
Open SettingsThe Keymap page of this dialog lists every binding and is where a shortcut is reassigned.Ctrl+Alt+SCmd+,
Save AllWrites every modified file and the IDE settings to disk in one go.Ctrl+SCmd+S
Reload All from DiskDetects files that were changed outside the IDE and loads their current content.Ctrl+Alt+YCmd+Option+Y
New file or directoryCreates a class, file or directory; in the editor the same key opens the Generate menu.Alt+InsertCmd+N
Close active editor tabCtrl+F4Cmd+W
Close active tool window tabCloses the current tab of a tool window such as Find, not an editor tab.Ctrl+Shift+F4Ctrl+Shift+F4
Select next tabWraps round to the first tab after the last one; works for editor tabs and tabbed views.Alt+RightCmd+Shift+]
Select previous tabWraps round to the last tab when the first one is active.Alt+LeftCmd+Shift+[
SwitcherWalks through the open files and the tool windows; keep the modifier held and press Tab to move on.Ctrl+TabCtrl+Tab
Close popup or return to editorIn the editor it dismisses popups, search and highlighting; in a tool window it puts the focus back in the editor.EscEsc
New scratch fileScratch files are kept outside the project directory and stay available in every project you open.Ctrl+Alt+Shift+InsertCmd+Shift+N
Detach editor tabMoves the active editor tab out of the main window.Shift+F4Shift+F4
Open in Right SplitFor a file selected in the Project tool window; it opens next to the current editor instead of replacing it.Shift+EnterShift+Return
Quick Switch SchemeOne popup for changing the theme, color scheme, code style, keymap, view mode or zoom without opening Settings.Ctrl+`Ctrl+`
Increase editor font sizeChanges the font size in all editors at once; an indicator at the bottom of the editor shows the current and the default size.Alt+Shift+.Ctrl+Shift+.
Decrease editor font sizeAlt+Shift+,Ctrl+Shift+,
Show file pathLists the directories on the path to the file being edited, so that any of them can be opened.Ctrl+Alt+F12Cmd+Option+F12

Editing 31

ActionWindows / LinuxMac
UndoCtrl+ZCmd+Z
RedoRedo is Undo with Shift added, because the Windows keymap gives Ctrl with Y to deleting a line.Ctrl+Shift+ZCmd+Shift+Z
CutWith nothing selected, the whole line at the caret goes to the clipboard.Ctrl+XCmd+X
CopyWith nothing selected, the whole line at the caret is copied.Ctrl+CCmd+C
PasteCtrl+VCmd+V
Paste from HistoryLets you pick one of the earlier clipboard entries instead of the latest.Ctrl+Shift+VCmd+Shift+V
Paste as plain textPastes the clipboard text as it is, without the adjustments a normal paste makes.Ctrl+Alt+Shift+VCmd+Option+Shift+V
Copy ReferenceCopies a reference string for the symbol or line at the caret rather than its text.Ctrl+Alt+Shift+CCmd+Option+Shift+C
Duplicate current lineCopies the line at the caret, or the selected block, directly below itself.Ctrl+DCmd+D
Delete lineRemoves the whole line the caret is on; the macOS keymap uses Cmd with Backspace.Ctrl+YCmd+Backspace
Join LinesMerges the selected lines, or the caret's line and the one below it, into one line.Ctrl+Shift+JCtrl+Shift+J
Smart line splitBreaks the line where the caret is; the caret stays on the upper part instead of moving down.Ctrl+EnterCmd+Return
Start new lineOpens a line below without breaking the current one and indents the caret to the current level.Shift+EnterShift+Return
Start new line aboveOpens an empty line above the caret's line.Ctrl+Alt+EnterCmd+Option+Return
Toggle CaseSwitches the selected text between upper and lower case.Ctrl+Shift+UCmd+Shift+U
Move line upMoves only the caret's line, whatever statement it belongs to.Alt+Shift+UpOption+Shift+Up
Move line downAlt+Shift+DownOption+Shift+Down
Move statement upMoves the whole statement at the caret, even one that spans several lines.Ctrl+Shift+UpCmd+Shift+Up
Move statement downCtrl+Shift+DownCmd+Shift+Down
Indent SelectionShifts the selected lines one indentation level to the right.TabTab
Unindent SelectionShifts the selected lines one indentation level to the left.Shift+TabShift+Tab
Auto-indent linesRe-indents the current line or the selection to match the Code Style settings; on a Mac it stays on Ctrl.Ctrl+Alt+ICtrl+Option+I
Toggle line commentComments out the caret's line or every selected line, and uncomments them when pressed again.Ctrl+/Cmd+/
Toggle block commentAdds or removes block comment markers around the code; the Mac binding takes Option where the Windows one takes Shift.Ctrl+Shift+/Cmd+Option+/
Delete to word endDeletes from the caret forward to where the word finishes.Ctrl+DeleteOption+Delete
Delete to word startDeletes from the caret back to where the word begins.Ctrl+BackspaceOption+Backspace
Toggle insert and overwrite modeListed without a Mac key: the help's macOS cell for this row shows the binding of a different action.Insert—
New line or accept itemIn the editor it breaks the line; in a completion list it inserts the highlighted suggestion.EnterReturn
Indent or accept and replaceIn a completion list, Tab inserts the suggestion and overwrites the code that follows the caret.TabTab
Delete selection or itemIn a usages view it excludes the selected entry rather than deleting any text.DeleteDelete
Delete previous characterBackspaceBackspace

Completion and code generation 17

ActionWindows / LinuxMac
Basic code completionSuggests classes, functions and variables valid at the caret; the macOS keymap keeps Ctrl for it.Ctrl+SpaceCtrl+Space
Smart code completionNarrows the suggestion list to items whose type fits what the code at the caret expects.Ctrl+Shift+SpaceCtrl+Shift+Space
Cyclic Expand WordEach press cycles to the next matching name of a class, function, keyword or variable in the visible scope.Alt+/Option+/
Import symbol completionFinds a symbol from the standard library or elsewhere in the project that the file does not #include yet.Ctrl+Alt+SpaceCtrl+Option+Space
Complete statementAdds what the current construct still lacks and puts the caret where the next statement starts.Ctrl+Shift+EnterCmd+Shift+Return
Show parameter infoShows the parameters that the function call at the caret takes.Ctrl+PCmd+P
Quick documentation lookupOpens the documentation of the symbol at the caret in a popup; the Mac key is plain F1.Ctrl+QF1
Quick DefinitionShows the definition of the symbol at the caret in a popup instead of opening its file.Ctrl+Shift+IOption+Space
External documentationPressed inside the quick documentation popup, it opens the external documentation of the code element.Shift+F1Shift+F1
View context informationShows the declaration of the function or class around the caret when it has scrolled out of view.Alt+QCtrl+Shift+Q
Generate codeOpens the Generate menu with the code generation options available at the caret.Alt+InsertCmd+N
Override functionsInserts overrides of functions inherited from a base class into the class at the caret.Ctrl+OCtrl+O
Implement functionsCreates stubs for the pure virtual functions of a base class that the current class does not implement yet.Ctrl+ICtrl+I
Generate definitionsFor functions declared in a class or namespace that have no implementation yet.Ctrl+Shift+DCmd+Shift+D
Surround WithWraps the selected code in a construct chosen from a list, such as a condition, a loop or a folding region.Ctrl+Alt+TCmd+Option+T
Reformat codeReformats the selected fragment, or the whole file when nothing is selected; ClangFormat is used when it is enabled.Ctrl+Alt+LCmd+Option+L
Reformat File dialogOpens the reformatting options for the file in the editor before anything is changed.Ctrl+Alt+Shift+LCmd+Option+Shift+L

Code analysis 6

ActionWindows / LinuxMac
Show error descriptionShows the text of the error or warning that is highlighted at the caret.Ctrl+F1Cmd+F1
Show intention actions and quick-fixesLists the fixes and code changes available at the caret, for example for a highlighted warning.Alt+EnterOption+Return
Highlighting level popupSets how much code analysis is highlighted in the file that is open in the editor.Ctrl+Alt+Shift+HCmd+Option+Shift+H
Next highlighted errorJumps to the next error or warning that code analysis marks in the file.F2F2
Previous highlighted errorShift+F2Shift+F2
Run inspection by nameRuns one chosen inspection on demand and shows what it finds in a separate window.Ctrl+Alt+Shift+ICmd+Option+Shift+I

Live templates 4

ActionWindows / LinuxMac
Insert live templateLists the templates whose abbreviation starts with the prefix typed before the caret.Ctrl+JCmd+J
Surround with live templateNeeds a selection; the chosen template is expanded around the selected code.Ctrl+Alt+JCmd+Option+J
Next template variableWhile a template is being filled in, jumps to its next placeholder.TabTab
Previous template variableWhile a template is being filled in, returns to the placeholder before the current one.Shift+TabShift+Tab

Caret movement 20

ActionWindows / LinuxMac
Caret upUpUp
Caret downDownDown
Caret leftLeftLeft
Caret rightRightRight
Caret to previous wordThe macOS keymap moves by word with Option and an arrow key.Ctrl+LeftOption+Left
Caret to next wordCtrl+RightOption+Right
Caret to line startHome on a PC keyboard; the macOS keymap uses Cmd with the Left arrow.HomeCmd+Left
Caret to line endEnd on a PC keyboard; the macOS keymap uses Cmd with the Right arrow.EndCmd+Right
Caret to start of fileCtrl+HomeCmd+Home
Caret to end of fileCtrl+EndCmd+End
Page UpPage UpPage Up
Page DownPage DownPage Down
Caret to top of pagePuts the caret on the first line that is visible in the editor without scrolling.Ctrl+Page UpCmd+Page Up
Caret to bottom of pagePuts the caret on the last line that is visible in the editor without scrolling.Ctrl+Page DownCmd+Page Down
Caret to code block startJumps to the opening brace of the block around the caret and highlights where the block starts and ends.Ctrl+[Cmd+Option+[
Caret to code block endJumps to the closing brace of the block around the caret.Ctrl+]Cmd+Option+]
Caret to matching braceJumps between the opening and the closing brace of the pair at the caret.Ctrl+Shift+MCtrl+M
Scroll caret line to centerBrings the caret's line to the middle of the editor, which finds the caret again in a long file.Ctrl+MCtrl+L
Scroll up one lineThe help shows no macOS key for this action.Ctrl+Up—
Scroll down one lineThe help shows no macOS key for this action.Ctrl+Down—

Selecting text 19

ActionWindows / LinuxMac
Select AllCtrl+ACmd+A
Increase syntax-aware selectionEach press widens the selection to the next larger block of code around the caret.Ctrl+WOption+Up
Decrease syntax-aware selectionUndoes the last widening step by step.Ctrl+Shift+WOption+Down
Extend selection upShift+UpShift+Up
Extend selection downShift+DownShift+Down
Extend selection leftShift+LeftShift+Left
Extend selection rightShift+RightShift+Right
Select to previous wordCtrl+Shift+LeftOption+Shift+Left
Select to next wordCtrl+Shift+RightOption+Shift+Right
Select to line startShift+HomeCmd+Shift+Left
Select to line endShift+EndCmd+Shift+Right
Select to start of fileCtrl+Shift+HomeCmd+Shift+Home
Select to end of fileCtrl+Shift+EndCmd+Shift+End
Select one page upShift+Page UpShift+Page Up
Select one page downShift+Page DownShift+Page Down
Select to top of pageCtrl+Shift+Page UpCmd+Shift+Page Up
Select to bottom of pageCtrl+Shift+Page DownCmd+Shift+Page Down
Select to code block startSelects from the caret back to the opening brace of the enclosing block.Ctrl+Shift+[Cmd+Option+Shift+[
Select to code block endSelects from the caret forward to the closing brace of the enclosing block.Ctrl+Shift+]Cmd+Option+Shift+]

Code folding 9

ActionWindows / LinuxMac
CollapseFolds the block the caret is in; the folding keys use the numeric keypad.Ctrl+Num -Cmd+Num -
ExpandUnfolds the collapsed block at the caret.Ctrl+Num +Cmd+Num +
Collapse RecursivelyFolds the block at the caret together with every foldable block nested in it.Ctrl+Alt+Num -Cmd+Option+Num -
Expand RecursivelyUnfolds the block at the caret together with the collapsed blocks nested in it.Ctrl+Alt+Num +Cmd+Option+Num +
Collapse AllFolds every foldable block in the file, or only those inside the selection.Ctrl+Shift+Num -Cmd+Shift+Num -
Expand AllUnfolds every collapsed block in the file, or only those inside the selection.Ctrl+Shift+Num +Cmd+Shift+Num +
Expand all to levelA sequence: the chord, then a digit from 1 to 5 for the nesting depth to open in the whole file.Ctrl+Shift+Num *then1-5Cmd+Option+Num *then1-5
Expand to levelThe same sequence without Shift opens only the fragment at the caret and its nested fragments to the chosen depth.Ctrl+Num *then1-5Cmd+Num *then1-5
Fold selection or remove regionTurns the selection into a custom folding region; on such a region it expands it and removes the region.Ctrl+.Cmd+.

Multiple carets 12

Clone Caret is not a chord. Tap the modifier once, press it again and keep it held, then use the Up or Down arrow; the modifier is Ctrl on Windows and Option on a Mac.

ActionWindows / LinuxMac
Place the caret in multiple locationsEach click adds a caret; clicking an existing caret removes it, except for the last one.Alt+Shift+ClickOption+Shift+Click
Clone caret aboveA double press, not a chord: tap the modifier, press it again and keep it down, then press the arrow.CtrlthenCtrl+UpOptionthenOption+Up
Clone caret belowEvery further press of the Down arrow adds one more caret on the next line.CtrlthenCtrl+DownOptionthenOption+Down
Carets at line endsNeeds a selection; a caret is placed at the end of every selected line.Alt+Shift+GOption+Shift+G
Select next occurrenceEach press finds the next case-sensitive match of the word or selection and adds a caret there.Alt+JCtrl+G
Unselect occurrenceDrops the occurrence that was added last.Alt+Shift+JCtrl+Shift+G
Select all occurrencesPuts a caret on every case-sensitive match in the file, so typing replaces them all at once.Ctrl+Alt+Shift+JCmd+Ctrl+G
Toggle column selection modeWhile the mode is on, Shift with the Up or Down arrow adds carets instead of extending a normal selection.Alt+Shift+InsertCmd+Shift+8
Rectangular selection by draggingHold the modifier and drag to select a rectangular block of text.Alt+DragOption+Drag
Rectangular selection to a cornerPut the caret at one corner first, then click the opposite corner with the middle button.Alt+Shift+Middle-clickOption+Shift+Middle-click
Add another rectangular selectionDragging with these modifiers keeps the existing rectangular selections and adds a new one.Ctrl+Alt+Shift+DragCmd+Option+Shift+Drag
Restore single caret modeRemoves every caret except the one added last.EscEsc

Bookmarks 5

ActionWindows / LinuxMac
Toggle anonymous bookmarkAdds an unnamed bookmark to the current line, or removes the one that is there.F11F3
Toggle mnemonic bookmarkAdds a bookmark that carries a digit or letter as its identifier.Ctrl+F11Option+F3
Show line bookmarksOpens a popup with the bookmarks set on code lines.Shift+F11Cmd+F3
Go to numbered bookmarkCtrl with the digit on both systems; the bookmark must have been created with that digit as its mnemonic.Ctrl+0-9Ctrl+0-9
Rename bookmarkIn the Bookmarks tool window, with a bookmark selected.F2F2

Search and replace 8

ActionWindows / LinuxMac
FindOpens the search bar at the top of the editor and searches the current file.Ctrl+FCmd+F
ReplaceSearch and replace within the current file.Ctrl+RCmd+R
Find next occurrenceMoves to the following match of the word being searched for in the editor.F3Cmd+G
Find previous occurrenceShift+F3Cmd+Shift+G
Find word at caretJumps to the next place the word under the caret occurs; the help gives this key for Windows only.Ctrl+F3—
Find in pathSearches the whole project or a narrower scope such as a directory.Ctrl+Shift+FCmd+Shift+F
Replace in FilesSearch and replace across the project or a chosen scope.Ctrl+Shift+RCmd+Shift+R
Find actionFinds any command by name when you do not remember its shortcut.Ctrl+Shift+ACmd+Shift+A

Refactoring 11

ActionWindows / LinuxMac
Refactor thisLists every refactoring available for the selection.Ctrl+Alt+Shift+TCtrl+T
RenameRenames a file, class, field or function and updates every reference to it.Shift+F6Shift+F6
Change signatureEdits a function's name, return type and parameters and updates all its calls to match.Ctrl+F6Cmd+F6
Extract functionMoves the selected statements into a new function and puts a call in their place.Ctrl+Alt+MCmd+Option+M
Introduce variableDeclares a variable initialised with the selected expression and uses it in place of that expression.Ctrl+Alt+VCmd+Option+V
Introduce constantDeclares a constant that is initialised with the expression you selected.Ctrl+Alt+CCmd+Option+C
Introduce parameterMakes the selected expression a new parameter of the enclosing function.Ctrl+Alt+PCmd+Option+P
InlineReplaces the uses of a function or variable with its body or value.Ctrl+Alt+NCmd+Option+N
MoveMoves the selected item elsewhere and corrects the references to it.F6F6
CopyDuplicates the selected class or file, either next to the original or in another directory.F5F5
Safe deleteSearches for usages of the symbol first, so that nothing still in use is removed.Alt+DeleteCmd+Delete

Compile, run and debug 28

Reload CMake Project has no default shortcut: the help points to the reload button, Tools | CMake and Find Action, and says a key can be assigned in Settings | Keymap.

ActionWindows / LinuxMac
BuildBuilds the configuration that is selected in the run/debug configuration switcher of the toolbar.Ctrl+F9Cmd+F9
Recompile current fileCompiles only the file in the editor, or the files selected in the project tree, without building the target.Ctrl+Shift+F9Cmd+Shift+F9
RunStarts the run/debug configuration that is selected in the toolbar switcher; the Mac key stays on Ctrl.Shift+F10Ctrl+R
Select configuration and runOpens a list of the configurations first, from which one can be run or edited.Alt+Shift+F10Ctrl+Option+R
Edit run configurationsA sequence: the configuration list opens first, then 0 picks Edit Configurations.Alt+Shift+F10then0Ctrl+Option+Rthen0
RerunStarts the same configuration again from the Run tool window, with unchanged settings.Ctrl+F5Cmd+R
StopEnds the running or debugged process; with several processes running you choose which one to stop.Ctrl+F2Cmd+F2
DebugStarts the selected configuration under the debugger.Shift+F9Ctrl+D
Select configuration and debugOpens a list of the configurations first, from which one can be debugged or edited.Alt+Shift+F9Ctrl+Option+D
Attach to ProcessLists the running processes so that the debugger can be attached to one of them.Ctrl+Alt+F5Option+Shift+F5
Step overRuns the current line, including any function it calls, and stops at the following line.F8F8
Step intoEnters the function called on the current line and stops at its first line.F7F7
Smart Step IntoPicks one of several calls on a line; the help says it does not apply to C/C++ debugging, only to languages such as Python.Shift+F7Shift+F7
Step OutFinishes the current function and stops at the line after its call.Shift+F8Shift+F8
Force Step OverSteps over a call even when the called code contains breakpoints.Alt+Shift+F8Option+Shift+F8
Force Step IntoEnters a function that plain Step Into would skip.Alt+Shift+F7Option+Shift+F7
Run to CursorContinues until execution reaches the line with the caret, with no breakpoint needed there.Alt+F9Option+F9
Force Run to CursorContinues to the caret line and does not stop at breakpoints on the way.Ctrl+Alt+F9Cmd+Option+F9
Show Execution PointReturns the editor to the line where the program is currently suspended.Alt+F10Option+F10
Resume ProgramContinues a suspended program until the next breakpoint; one of the debugger keys that differ on a Mac.F9Cmd+Option+R
Pause ProgramSuspends the running program. The help prints this key as fixed text, so no macOS key is listed.Ctrl+Pause—
Evaluate expressionOpens a dialog that computes any expression in the context of the suspended program.Alt+F8Option+F8
Quick Evaluate ExpressionEvaluates the selected expression at once, without opening the Evaluate dialog.Ctrl+Alt+F8Cmd+Option+F8
Show in Memory ViewWith a variable selected in the Variables tab, opens the raw memory region that starts at its address.Ctrl+EnterCmd+Return
Set ValueChanges the value of the variable selected in the Variables pane while the program is suspended.F2F2
Jump to Type SourceFrom a variable in the Variables pane, opens the declaration of its type.Shift+F4Shift+F4
Toggle breakpointSets a line breakpoint on the caret's line, or removes the one that is there.Ctrl+F8Cmd+F8
View BreakpointsOpens the dialog that lists all breakpoints of the project with their settings.Ctrl+Shift+F8Cmd+Shift+F8

Version control 9

ActionWindows / LinuxMac
VCS quick popupLists the version control commands; the help calls it the Git Operations Popup when Git is in use.Alt+`Ctrl+V
Commit project to VCSCtrl+KCmd+K
Commit and PushPushes to the remote repository right after the commit; the commits can still be reviewed before they are sent.Ctrl+Alt+KCmd+Option+K
Update project from VCSCtrl+TCmd+T
Push commitsCtrl+Shift+KCmd+Shift+K
RollbackCtrl+Alt+ZCmd+Option+Z
Stage fileIn the Commit tool window, stages the whole selected file for the next commit.Ctrl+Alt+ACmd+Option+A
Next ChangeCtrl+Alt+Shift+DownCtrl+Option+Shift+Down
Previous ChangeCtrl+Alt+Shift+UpCtrl+Option+Shift+Up

Comparing files 7

ActionWindows / LinuxMac
Show DiffWith two files selected, or one file with versions to compare, opens the Diff Viewer in a new tab.Ctrl+DCmd+D
Next DifferenceIn a diff view, jumps to the following changed fragment; in a debug session the same key steps into.F7F7
Previous DifferenceShift+F7Shift+F7
Compare previous fileOnly available when more than one file has been modified locally.Alt+LeftCmd+Shift+[
Compare next fileAlt+RightCmd+Shift+]
Switch diff panesMoves the caret to the other side of the Diff Viewer.Ctrl+Shift+TabCtrl+Shift+Tab
Diff commands popupOpens a menu with the diff commands that are used most often.Ctrl+Shift+DCmd+Shift+D

Tool windows 24

ActionWindows / LinuxMac
Show Project windowThe numbered tool windows take Alt with a digit on Windows and Cmd with the digit on a Mac.Alt+1Cmd+1
Show Bookmarks windowBesides bookmarks, this window also lists the breakpoints.Alt+2Cmd+2
Show Find windowAlt+3Cmd+3
Show Run windowAlt+4Cmd+4
Show Debug windowAlt+5Cmd+5
Show Problems windowAlt+6Cmd+6
Show Structure windowShows the structure of the file in the editor as a tool window rather than a popup.Alt+7Cmd+7
Show Services windowAlt+8Cmd+8
Show Version Control windowAlt+9Cmd+9
Show Commit windowAlt+0Cmd+0
Show Terminal windowOpens the terminal in the root directory of the project by default.Alt+F12Option+F12
Hide all tool windowsLeaves only the editor on screen.Ctrl+Shift+F12Cmd+Shift+F12
Hide active tool windowCloses the tool window that has the focus; its own shortcut brings it back.Shift+EscShift+Esc
Jump to last tool windowFrom the editor, puts the focus back in the tool window that was active before.F12F12
Stretch tool window to leftResizes the active tool window from the keyboard; the Mac binding has no Shift.Ctrl+Alt+Shift+LeftCtrl+Option+Left
Stretch tool window to rightCtrl+Alt+Shift+RightCtrl+Option+Right
Stretch tool window to topCtrl+Alt+Shift+UpCtrl+Option+Up
Stretch tool window to bottomCtrl+Alt+Shift+DownCtrl+Option+Down
Expand all tree nodesWorks in tool windows that show a tree; uses the numeric keypad.Ctrl+Num +Cmd+Num +
Collapse all tree nodesWorks in tool windows that show a tree; uses the numeric keypad.Ctrl+Num -Cmd+Num -
Restore default layoutPuts the tool windows back into the arrangement saved as the default layout.Shift+F12Shift+F12
Maximize tool windowStretches the active tool window to the largest width or height available.Ctrl+Shift+'Cmd+Shift+'
New terminal tabStarts another shell session in a separate tab of the Terminal tool window.Ctrl+Shift+TCmd+T
Close terminal tabCtrl+F4Cmd+W

Notes

Finding code across headers

Ctrl + B on a usage opens the symbol's declaration; pressed on the declaration itself it lists the usages by default. Ctrl + Alt + B goes to the definition, and F10 switches between a source file and its header — the round trip that C++ needs constantly. Any file opens through Ctrl + Shift + N, and Ctrl + E lists recent files, which is often the fastest way back to the .cpp you were editing. Alt + F7 finds usages across the project, Ctrl + F12 shows the structure of the current file, and Shift, Shift searches everything: files, classes, symbols, actions and settings. The macOS keymap uses Cmd + B, Cmd + Option + B, Cmd + Shift + O, Cmd + E, Option + F7 and Cmd + F12; F10 is the same.

Editing and fixing

Alt + Enter opens the context actions at the caret: quick-fixes for highlighted errors and warnings, and intention actions such as generating a stub for a function that is called but not written yet. Ctrl + Alt + L reformats the selection or the whole file, following .clang-format when ClangFormat support is enabled. Ctrl + / comments the line, Ctrl + D duplicates it, and F2 jumps to the next highlighted error or warning. Shift + F6 renames a symbol in all its references, and Ctrl + Shift + D generates definitions for functions that are declared but not implemented. On a Mac these are Option + Return, Cmd + Option + L, Cmd + /, Cmd + D and Cmd + Shift + D; F2 and Shift + F6 do not change.

Building, running, debugging

Ctrl + F9 builds the configuration selected in the toolbar switcher, and Ctrl + Shift + F9 recompiles only the current file. Shift + F10 runs the selected configuration, Alt + Shift + F10 lets you pick one first, and Shift + F9 starts it under the debugger — GDB on all platforms, or the bundled LLDB on macOS and Linux. Because a CMake project has many targets, the configuration switcher decides which one these keys build and launch. While the program is suspended, F8 steps over, F7 steps into, and Ctrl + Enter on a variable opens its address in Memory View. Ctrl + Shift + A finds any action by name, such as Reload CMake Project, which has no default shortcut and is needed after editing CMakeLists.txt unless auto-reload is on. On a Mac, Build is Cmd + F9, Run is Ctrl + R and Debug is Ctrl + D.

Questions

Which key switches between a header and its source file in CLion?

The Go to Header/Source action on F10; the help prints the same key under the Windows and the macOS keymap. Go to Related Symbol (Ctrl + Alt + Home, on a Mac Cmd + Ctrl + Up) also moves between related files, and CLion offers to remap its shortcut to Go to Header/Source.

Is there a default shortcut for Reload CMake Project?

The help prints none. After CMakeLists.txt changes, CLion shows a floating notification that reloads the project when clicked; otherwise run the action from Tools › CMake or through Find Action (Ctrl + Shift + A), or assign your own key in Settings › Keymap.

How do I build in CLion without running the program?

Ctrl + F9 (Cmd + F9 on a Mac) builds the configuration selected in the switcher. Ctrl + Shift + F9 recompiles only the file in the editor, or the files selected in the project tree, and stops at the first compilation failure.

What does pressing Shift twice do in CLion?

It opens Search Everywhere, one box that finds files, classes, symbols, actions, tool windows and settings. Pressing Ctrl twice opens Run Anything. Both double-modifier shortcuts can be switched off in Settings › Advanced Settings.

How do I look at raw memory while debugging?

Select a variable in the Variables tab of the Debug tool window and press Ctrl + Enter (Cmd + Return on a Mac), or choose Show in Memory View from its context menu. Memory View opens at the address of the variable and is updated as you step.

Do the Windows shortcuts also apply to CLion on Linux?

The CLion help does not say so directly. Its keymap selector offers Windows and macOS, and keymaps such as Eclipse, Emacs and Visual Studio, but no Linux keymap; it says CLion suggests a predefined keymap based on your environment, and keymaps for GNOME and KDE are installed as plugins. For Ubuntu the help lists defaults that collide with system shortcuts, for example Ctrl + Alt + L (Lock screen) and Alt + F8 (Resize window).

Sources and checks

37 more source pages

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.