In xcode I type cmd-shift up/down to switch between .h and .c files. How do I do that in CLion? Or more usefully, what would that action be called in the keymap? I don't find the keymap names terribly usefully named. None stand out for this purpose, including after the usual googling.
Asked
Active
Viewed 2.6k times
4 Answers
130
The shortcut is called 'Related Symbol' in the keymap.
On Mac it defaults to Ctrl+Cmd+Up,
on Windows/Linux -- to Ctrl+Alt+Home.

Ayrat
- 1,221
- 1
- 18
- 36
-
2Ubuntu running o a Mac: Ctrl + Alt + fn + Left – Adrian Schneider Oct 31 '17 at 08:32
-
Does not work for me. Do .c and .h files have to be in the same folder? I use CMake and my headers are in a separate `includes` directory. Is there a workaround? – Aleksei Petrenko Jul 16 '20 at 02:53
19
To switch between .h and .c files I use F10 key or the Navigate menu in CLion in Linux system:
F10 Header/Source

Gianluca Ghisleni
- 191
- 1
- 5
-
-
It does not work in Ubuntu 18.04 because of the stupid system-wide Ubuntu shortcut – Aleksei Petrenko Mar 04 '20 at 19:55
-
Aleksei Petrenko you can change this shortcut in Keymap option in Setting. My system is Debian 10, and Altgr+F10 it's free for this purpose. – Gianluca Ghisleni Mar 05 '20 at 19:05
-
Found my way here from the linked question regarding Android Studio. In Windows Android Studio 4.0.1 seems to support F10 as well (ctrl + alt + home works too, but pressing single key is much more convenient). – Scam Nov 12 '20 at 11:11
4
you can try: Navigate | Related Symbol

earthwu
- 57
- 1
-
3This doesn't sound like an answer. If you're sure this works, kindly elaborate your point. – CinCout Dec 17 '15 at 03:12
0
If header and implementation files are already open you can switch between windows with double-shift and enter keys.

Mansouri
- 233
- 4
- 6