CLion Keyboard Shortcuts: Complete List for Windows, Mac & Linux

Quick answer: The most-used CLion shortcuts are comment a line Ctrl + / (⌘ + / on Mac), reformat code Ctrl + Alt + L (⌥ + ⌘ + L on Mac), build project Ctrl + F9 (⌘ + F9 on Mac), and run Shift + F10 (⌃ + R on Mac). CLion ships with 100+ default keyboard shortcuts across editing, navigation, refactoring, debugging, search, and build categories all of which you can customize in Settings → Keymap.

CLion is a cross-platform C and C++ IDE from JetBrains, built around the CMake build system. Like every JetBrains IDE, it is designed for ergonomic keyboard use: memorizing its hotkeys keeps your hands on the keyboard and measurably speeds up navigation, refactoring, and debugging. This guide lists every essential CLion keyboard shortcut for Windows, macOS, and Linux, organized by category, with a free downloadable PDF cheat sheet at the end.

What Is CLion?

CLion is a professional, cross-platform integrated development environment (IDE) for C and C++ from JetBrains, integrated with the CMake build system and offering smart code completion, on-the-fly analysis, refactoring, and a built-in debugger. It runs on Windows, macOS, and Linux, and supports interchangeable keymaps (including Visual Studio, Eclipse, NetBeans, Xcode, and VIM) so you can keep the shortcuts you already know.

CLion does not require Cygwin. It works with several toolchains including bundled MinGW, MSVC, WSL, and remote/Docker toolchains and you can select or switch them under Settings → Build, Execution, Deployment → Toolchains.

Top 15 Most Useful CLion Shortcuts

ActionWindows / LinuxmacOS
Search EverywhereDouble ShiftDouble Shift
Find ActionCtrl + Shift + A⇧ + ⌘ + A
Show context actions / quick-fixAlt + Enter⌥ + Enter
Comment / uncomment lineCtrl + /⌘ + /
Reformat codeCtrl + Alt + L⌥ + ⌘ + L
Duplicate lineCtrl + D⌘ + D
Delete lineCtrl + Y⌘ + ⌫
Basic code completionCtrl + Space⌃ + Space
Go to declarationCtrl + B⌘ + B
Recent filesCtrl + E⌘ + E
Rename (refactor)Shift + F6⇧ + F6
Find usagesAlt + F7⌥ + F7
Build projectCtrl + F9⌘ + F9
RunShift + F10⌃ + R
DebugShift + F9⌃ + D

Editing Shortcuts

ActionWindows / LinuxmacOS
CutCtrl + X⌘ + X
CopyCtrl + C⌘ + C
PasteCtrl + V⌘ + V
Paste from recent buffersCtrl + Shift + V⇧ + ⌘ + V
Duplicate current lineCtrl + D⌘ + D
Delete line at caretCtrl + Y⌘ + ⌫
Comment / uncomment with line commentCtrl + /⌘ + /
Comment / uncomment with block commentCtrl + Shift + /⌥ + ⌘ + /
Generate codeAlt + Insert⌘ + N
Override methodsCtrl + O⌃ + O
Implement methodsCtrl + I⌃ + I
Reformat codeCtrl + Alt + L⌥ + ⌘ + L
Optimize importsCtrl + Alt + O⌃ + ⌥ + O
Auto-indent linesCtrl + Alt + I⌃ + ⌥ + I
Indent / unindent selected linesTab / Shift + TabTab / ⇧ + Tab
Basic code completionCtrl + Space⌃ + Space
Smart code completionCtrl + Shift + Space⌃ + ⇧ + Space
Complete statementCtrl + Shift + Enter⇧ + ⌘ + Enter
Parameter infoCtrl + P⌘ + P
Quick documentation lookupCtrl + Q⌃ + J / F1
Show context actions (quick-fix)Alt + Enter⌥ + Enter
Extend selectionCtrl + W⌥ + Up
Shrink selectionCtrl + Shift + W⌥ + Down
Smart line joinCtrl + Shift + J⌃ + ⇧ + J
Smart line splitCtrl + Enter⌘ + Enter
Start new lineShift + Enter⇧ + Enter
Toggle case for word at caretCtrl + Shift + U⇧ + ⌘ + U
Delete to word endCtrl + Delete⌥ + ⌦
Delete to word startCtrl + Backspace⌥ + ⌫
Add selection for next occurrenceAlt + J⌃ + G
Close active editor tabCtrl + F4⌘ + W

Navigation Shortcuts

ActionWindows / LinuxmacOS
Search EverywhereDouble ShiftDouble Shift
Go to classCtrl + N⌘ + O
Go to fileCtrl + Shift + N⇧ + ⌘ + O
Go to symbolCtrl + Alt + Shift + N⌥ + ⌘ + O
Go to lineCtrl + G⌘ + L
Recent files popupCtrl + E⌘ + E
Recent locationsCtrl + Shift + E⇧ + ⌘ + E
Next / previous editor tabAlt + Right / Left⌃ + Right / Left
Navigate backCtrl + Alt + Left⌘ + [
Navigate forwardCtrl + Alt + Right⌘ + ]
Last edit locationCtrl + Shift + Backspace⇧ + ⌘ + ⌫
Go to declarationCtrl + B⌘ + B
Go to implementationCtrl + Alt + B⌥ + ⌘ + B
Go to type declarationCtrl + Shift + B⇧ + ⌃ + B
Go to super-methodCtrl + U⌘ + U
Quick definition lookupCtrl + Shift + I⌥ + Space
Previous / next methodAlt + Up / Down⌃ + Up / Down
Move to code block end / startCtrl + ] / Ctrl + [⌘ + ] / ⌘ + [
File structure popupCtrl + F12⌘ + F12
Type hierarchyCtrl + H⌃ + H
Call hierarchyCtrl + Alt + H⌃ + ⌥ + H
Next / previous highlighted errorF2 / Shift + F2F2 / ⇧ + F2
Toggle bookmarkF11F3
Show bookmarksShift + F11⌘ + F3
Select current file in tool windowAlt + F1⌥ + F1
Hide active / last active windowShift + Esc⇧ + Esc

Code Folding Shortcuts

ActionWindows / LinuxmacOS
Expand code blockCtrl + +⌘ + +
Collapse code blockCtrl + –⌘ + –
Expand allCtrl + Alt + +⌥ + ⌘ + +
Collapse allCtrl + Alt + –⌥ + ⌘ + –
Expand / collapse recursivelyCtrl + Alt + Numpad + / –⌥ + ⌘ + Numpad + / –

Refactoring Shortcuts

ActionWindows / LinuxmacOS
Refactor This (menu)Ctrl + Alt + Shift + T⌃ + T
RenameShift + F6⇧ + F6
MoveF6F6
CopyF5F5
Safe deleteAlt + Delete⌘ + ⌦
Change signatureCtrl + F6⌘ + F6
Extract method / functionCtrl + Alt + M⌥ + ⌘ + M
Extract variableCtrl + Alt + V⌥ + ⌘ + V
Extract constantCtrl + Alt + C⌥ + ⌘ + C
Extract parameterCtrl + Alt + P⌥ + ⌘ + P
InlineCtrl + Alt + N⌥ + ⌘ + N

Debugging Shortcuts

ActionWindows / LinuxmacOS
Toggle breakpointCtrl + F8⌘ + F8
View breakpointsCtrl + Shift + F8⇧ + ⌘ + F8
Step overF8F8
Step intoF7F7
Step outShift + F8⇧ + F8
Run to cursorAlt + F9⌥ + F9
Evaluate expressionAlt + F8⌥ + F8
Resume programF9⌘ + ⌥ + R
StopCtrl + F2⌘ + F2

Find & Replace Shortcuts

ActionWindows / LinuxmacOS
FindCtrl + F⌘ + F
Find nextF3⌘ + G
Find previousShift + F3⇧ + ⌘ + G
ReplaceCtrl + R⌘ + R
Find in files (path)Ctrl + Shift + F⇧ + ⌘ + F
Replace in files (path)Ctrl + Shift + R⇧ + ⌘ + R
Find usagesAlt + F7⌥ + F7
Find actionCtrl + Shift + A⇧ + ⌘ + A

Build, Compile & Run Shortcuts

ActionWindows / LinuxmacOS
Build projectCtrl + F9⌘ + F9
RunShift + F10⌃ + R
DebugShift + F9⌃ + D
Run anythingDouble CtrlDouble ⌃
Select configuration and runAlt + Shift + F10⌃ + ⌥ + R
Select configuration and debugAlt + Shift + F9⌃ + ⌥ + D
StopCtrl + F2⌘ + F2

How to Customize CLion Shortcuts

Every default shortcut in CLion is configurable, and you can assign shortcuts to actions that don’t have one. Here’s how to change a shortcut:

  1. Open Settings press Ctrl + Alt + S (⌘ + , on Mac).
  2. Select Keymap in the left panel.
  3. Search for the action by name in the search box.
  4. Right-click the action and choose Add Keyboard Shortcut.
  5. Press your desired key combination, then click OK.

Download the CLion Shortcuts PDF Cheat Sheet

Want all of these CLion keyboard shortcuts on one page? Download the CLion Shortcuts PDF cheat sheet and keep it on your desk, or open the official reference inside CLion via Help → Keyboard Shortcuts PDF.

Frequently Asked Questions

What is the comment shortcut in CLion?

Press Ctrl + / (⌘ + / on Mac) to comment or uncomment a single line, and Ctrl + Shift + / (⌥ + ⌘ + / on Mac) for a block comment.

How do I reformat code in CLion?

Press Ctrl + Alt + L (⌥ + ⌘ + L on Mac) to reformat the current file or selection according to your code style settings.

How do I build a project in CLion?

Press Ctrl + F9 (⌘ + F9 on Mac) to build the project. To build and run, use Shift + F10 (⌃ + R on Mac).

How do I delete a line in CLion?

Press Ctrl + Y on Windows/Linux or ⌘ + ⌫ on Mac to delete the line at the caret.

How do I move a line up or down in CLion?

Use Alt + Shift + Up / Down (⌥ + ⇧ + Up / Down on Mac) to move a line, or Ctrl + Shift + Up / Down (⌘ + ⇧ + Up / Down on Mac) to move a whole statement.

How do I collapse a code block in CLion?

Press Ctrl + − (⌘ + − on Mac) to collapse the current block, or Ctrl + Alt + − (⌥ + ⌘ + − on Mac) to collapse all blocks.

What does Alt + 8 do in CLion?

By default, number-key combinations with Alt (Windows/Linux) open tool windows for example, the Debug tool window. You can verify or reassign these under Settings → Keymap.

Can I change CLion keyboard shortcuts?

Yes. Open Settings → Keymap (Ctrl + Alt + S), find the action, right-click it, and choose Add Keyboard Shortcut. You can also switch to a predefined keymap such as Visual Studio or Eclipse.

READ NEXT:

Pratik

Pratik is the founder of Tutorial Tactic and a productivity tools specialist with 15 years of hands-on experience in Google Workspace, Microsoft Office, and software automation. He has published over 1,500 guides on keyboard shortcuts, software commands, how-to tutorials and workflow optimization, helping readers across the US and India work faster with the tools they use every day. Tutorial Tactic was founded in 2021 with one goal: cut through the noise and give readers exactly what they need fast, verified, and beginner-friendly.
Back to top button