CLion supports a variety of keymaps:
- IntelliJ IDEA,
- Visual Studio,
- VIM, etc.
Choose and use your favorite one, or tweak it and save a custom one. Go to Preferences/Settings | Appearance and Behavior | Keymap to manage keymaps, or just press Ctrl+` to quickly switch the scheme.
If a shortcut is not working for you, before reporting the error to our tracker please rule out the following possibilities:
- The CLion shortcut conflicts with some system shortcut, and pressing it in the IDE does something different from the expected behavior.
- You are trying a shortcut that differs from the current keymap set.
If the problem persists, please report the issue to our tracker.
Here is a list of the top 10 actions & default keymap shortcuts for these actions:
- Quick-fix: Alt+Enter on all platforms — Shows intention actions and quick-fixes.
- Smart completion: Ctrl+Shift+Space on all platforms — Offers more accurate completion suggestions than basic completion, by filtering the list of methods and variables to match the expression type.
- Refactor this: Ctrl+T on all platforms — Shows the list of refactorings available in the current scope.
- Parameter info: Cmd+P on OS X, Ctrl+P on Windows/Linux — Shows the method call’s arguments with types.
- Go to Related Symbol: Ctrl+Cmd+Up for OS X, Ctrl+Alt+Home — Helps you to quickly navigate between .h and .cpp files, and more.
- Generate code: Cmd+N on OS X, Alt+Insert on Windows/Linux — Suggests code generation options for you.
- Surround With: Cmd+Alt+T on OS X, Ctrl+Alt+T on Windows/Linux — Helps you generate surrounding blocks of code like if..else, do..while, #ifdef, etc.
- Find usages: Alt+F7 on all platforms — Finds code and non-code usages of the selected word.
- File structure: Cmd+F12 for OS X, Ctrl+F12 in Windows/Linux— Helps you navigate through the file structure.
- Find action: Shift+Cmd+A on OS X, Ctrl+Shift+A on Windows/Linux — Searches for actions by their names; especially useful when you don’t know the full action name.