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.
CLion: Keyboard cmd to switch between header and implementation files like in xcode
The shortcut is called 'Related Symbol' in the keymap.
On Mac it defaults to Ctrl+Cmd+Up,
on Windows/Linux -- to Ctrl+Alt+Home.
Ubuntu running o a Mac: Ctrl + Alt + fn + Left –
Warmblooded
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? –
Winegar To switch between .h and .c files I use F10 key or the Navigate menu in CLion in Linux system:
F10 Header/Source
Please be more specific –
Midland
It does not work in Ubuntu 18.04 because of the stupid system-wide Ubuntu shortcut –
Winegar
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. –
Commutative
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). –
Prejudicial
you can try: Navigate | Related Symbol
This doesn't sound like an answer. If you're sure this works, kindly elaborate your point. –
Lo
If header and implementation files are already open you can switch between windows with double-shift and enter keys.
That switches to the last window, not between header and source. –
Complicacy
© 2022 - 2024 — McMap. All rights reserved.