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
| Action | Windows / Linux | macOS |
|---|---|---|
| Search Everywhere | Double Shift | Double Shift |
| Find Action | Ctrl + Shift + A | ⇧ + ⌘ + A |
| Show context actions / quick-fix | Alt + Enter | ⌥ + Enter |
| Comment / uncomment line | Ctrl + / | ⌘ + / |
| Reformat code | Ctrl + Alt + L | ⌥ + ⌘ + L |
| Duplicate line | Ctrl + D | ⌘ + D |
| Delete line | Ctrl + Y | ⌘ + ⌫ |
| Basic code completion | Ctrl + Space | ⌃ + Space |
| Go to declaration | Ctrl + B | ⌘ + B |
| Recent files | Ctrl + E | ⌘ + E |
| Rename (refactor) | Shift + F6 | ⇧ + F6 |
| Find usages | Alt + F7 | ⌥ + F7 |
| Build project | Ctrl + F9 | ⌘ + F9 |
| Run | Shift + F10 | ⌃ + R |
| Debug | Shift + F9 | ⌃ + D |
Editing Shortcuts
| Action | Windows / Linux | macOS |
|---|---|---|
| Cut | Ctrl + X | ⌘ + X |
| Copy | Ctrl + C | ⌘ + C |
| Paste | Ctrl + V | ⌘ + V |
| Paste from recent buffers | Ctrl + Shift + V | ⇧ + ⌘ + V |
| Duplicate current line | Ctrl + D | ⌘ + D |
| Delete line at caret | Ctrl + Y | ⌘ + ⌫ |
| Comment / uncomment with line comment | Ctrl + / | ⌘ + / |
| Comment / uncomment with block comment | Ctrl + Shift + / | ⌥ + ⌘ + / |
| Generate code | Alt + Insert | ⌘ + N |
| Override methods | Ctrl + O | ⌃ + O |
| Implement methods | Ctrl + I | ⌃ + I |
| Reformat code | Ctrl + Alt + L | ⌥ + ⌘ + L |
| Optimize imports | Ctrl + Alt + O | ⌃ + ⌥ + O |
| Auto-indent lines | Ctrl + Alt + I | ⌃ + ⌥ + I |
| Indent / unindent selected lines | Tab / Shift + Tab | Tab / ⇧ + Tab |
| Basic code completion | Ctrl + Space | ⌃ + Space |
| Smart code completion | Ctrl + Shift + Space | ⌃ + ⇧ + Space |
| Complete statement | Ctrl + Shift + Enter | ⇧ + ⌘ + Enter |
| Parameter info | Ctrl + P | ⌘ + P |
| Quick documentation lookup | Ctrl + Q | ⌃ + J / F1 |
| Show context actions (quick-fix) | Alt + Enter | ⌥ + Enter |
| Extend selection | Ctrl + W | ⌥ + Up |
| Shrink selection | Ctrl + Shift + W | ⌥ + Down |
| Smart line join | Ctrl + Shift + J | ⌃ + ⇧ + J |
| Smart line split | Ctrl + Enter | ⌘ + Enter |
| Start new line | Shift + Enter | ⇧ + Enter |
| Toggle case for word at caret | Ctrl + Shift + U | ⇧ + ⌘ + U |
| Delete to word end | Ctrl + Delete | ⌥ + ⌦ |
| Delete to word start | Ctrl + Backspace | ⌥ + ⌫ |
| Add selection for next occurrence | Alt + J | ⌃ + G |
| Close active editor tab | Ctrl + F4 | ⌘ + W |
Navigation Shortcuts
| Action | Windows / Linux | macOS |
|---|---|---|
| Search Everywhere | Double Shift | Double Shift |
| Go to class | Ctrl + N | ⌘ + O |
| Go to file | Ctrl + Shift + N | ⇧ + ⌘ + O |
| Go to symbol | Ctrl + Alt + Shift + N | ⌥ + ⌘ + O |
| Go to line | Ctrl + G | ⌘ + L |
| Recent files popup | Ctrl + E | ⌘ + E |
| Recent locations | Ctrl + Shift + E | ⇧ + ⌘ + E |
| Next / previous editor tab | Alt + Right / Left | ⌃ + Right / Left |
| Navigate back | Ctrl + Alt + Left | ⌘ + [ |
| Navigate forward | Ctrl + Alt + Right | ⌘ + ] |
| Last edit location | Ctrl + Shift + Backspace | ⇧ + ⌘ + ⌫ |
| Go to declaration | Ctrl + B | ⌘ + B |
| Go to implementation | Ctrl + Alt + B | ⌥ + ⌘ + B |
| Go to type declaration | Ctrl + Shift + B | ⇧ + ⌃ + B |
| Go to super-method | Ctrl + U | ⌘ + U |
| Quick definition lookup | Ctrl + Shift + I | ⌥ + Space |
| Previous / next method | Alt + Up / Down | ⌃ + Up / Down |
| Move to code block end / start | Ctrl + ] / Ctrl + [ | ⌘ + ] / ⌘ + [ |
| File structure popup | Ctrl + F12 | ⌘ + F12 |
| Type hierarchy | Ctrl + H | ⌃ + H |
| Call hierarchy | Ctrl + Alt + H | ⌃ + ⌥ + H |
| Next / previous highlighted error | F2 / Shift + F2 | F2 / ⇧ + F2 |
| Toggle bookmark | F11 | F3 |
| Show bookmarks | Shift + F11 | ⌘ + F3 |
| Select current file in tool window | Alt + F1 | ⌥ + F1 |
| Hide active / last active window | Shift + Esc | ⇧ + Esc |
Code Folding Shortcuts
| Action | Windows / Linux | macOS |
|---|---|---|
| Expand code block | Ctrl + + | ⌘ + + |
| Collapse code block | Ctrl + – | ⌘ + – |
| Expand all | Ctrl + Alt + + | ⌥ + ⌘ + + |
| Collapse all | Ctrl + Alt + – | ⌥ + ⌘ + – |
| Expand / collapse recursively | Ctrl + Alt + Numpad + / – | ⌥ + ⌘ + Numpad + / – |
Refactoring Shortcuts
| Action | Windows / Linux | macOS |
|---|---|---|
| Refactor This (menu) | Ctrl + Alt + Shift + T | ⌃ + T |
| Rename | Shift + F6 | ⇧ + F6 |
| Move | F6 | F6 |
| Copy | F5 | F5 |
| Safe delete | Alt + Delete | ⌘ + ⌦ |
| Change signature | Ctrl + F6 | ⌘ + F6 |
| Extract method / function | Ctrl + Alt + M | ⌥ + ⌘ + M |
| Extract variable | Ctrl + Alt + V | ⌥ + ⌘ + V |
| Extract constant | Ctrl + Alt + C | ⌥ + ⌘ + C |
| Extract parameter | Ctrl + Alt + P | ⌥ + ⌘ + P |
| Inline | Ctrl + Alt + N | ⌥ + ⌘ + N |
Debugging Shortcuts
| Action | Windows / Linux | macOS |
|---|---|---|
| Toggle breakpoint | Ctrl + F8 | ⌘ + F8 |
| View breakpoints | Ctrl + Shift + F8 | ⇧ + ⌘ + F8 |
| Step over | F8 | F8 |
| Step into | F7 | F7 |
| Step out | Shift + F8 | ⇧ + F8 |
| Run to cursor | Alt + F9 | ⌥ + F9 |
| Evaluate expression | Alt + F8 | ⌥ + F8 |
| Resume program | F9 | ⌘ + ⌥ + R |
| Stop | Ctrl + F2 | ⌘ + F2 |
Find & Replace Shortcuts
| Action | Windows / Linux | macOS |
|---|---|---|
| Find | Ctrl + F | ⌘ + F |
| Find next | F3 | ⌘ + G |
| Find previous | Shift + F3 | ⇧ + ⌘ + G |
| Replace | Ctrl + R | ⌘ + R |
| Find in files (path) | Ctrl + Shift + F | ⇧ + ⌘ + F |
| Replace in files (path) | Ctrl + Shift + R | ⇧ + ⌘ + R |
| Find usages | Alt + F7 | ⌥ + F7 |
| Find action | Ctrl + Shift + A | ⇧ + ⌘ + A |
Build, Compile & Run Shortcuts
| Action | Windows / Linux | macOS |
|---|---|---|
| Build project | Ctrl + F9 | ⌘ + F9 |
| Run | Shift + F10 | ⌃ + R |
| Debug | Shift + F9 | ⌃ + D |
| Run anything | Double Ctrl | Double ⌃ |
| Select configuration and run | Alt + Shift + F10 | ⌃ + ⌥ + R |
| Select configuration and debug | Alt + Shift + F9 | ⌃ + ⌥ + D |
| Stop | Ctrl + 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:
- Open Settings press Ctrl + Alt + S (⌘ + , on Mac).
- Select Keymap in the left panel.
- Search for the action by name in the search box.
- Right-click the action and choose Add Keyboard Shortcut.
- 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:





