12 August 2017

JetBrains IDE Hack

After years of using JetBrains IDEs (Android Studio, CLion, IntelliJ IDEA, PyCharm, etc.), and innumerable futile Internet searches for how to switch panes with the keyboard (when you have multiple panes showing, of course), I finally figured it out.

Panes are called "splitters" in JetBrains parlance. So you have to find the "Goto Next Splitter" and "Goto Previous Splitter" commands in the keymap (search for "splitter" in the settings window), and assign keyboard shortcuts to them. You do this by right-clicking on those commands in the keymap settings and selecting "Add keyboard shortcut".

I wanted to map them to the vi equivalent -- ctrl-w, w -- but ctrl-w is mapped to "extend selection" in the Gnome keymap, and I find it very useful. So I mapped "next splitter" to ctrl-shift-s, s, and "previous splitter" to ctrl-shift-s, p. Now I can switch panes -- er, splitters -- without having to touch the mouse. Something I've been wanting to be able to do since I started using JetBrains IDEs.