Is there any default keyboard shortcut to close all tabs except the active one? It can be done by right-clicking the tab and choosing Close Others but I'd like to do this using only my keyboard.

ctrl+shift+a and write Close Others. Select the one with Editor Close Actions.
Or assign it your own shortcut.
Open Settings > Keymap. Search for Close others (or find it under Main menu > Window > Editor tabs.
It's not possible to access the tab context menu using the keyboard.
There's an open issue against IntelliJ for this.
Their suggestion is to add that action (tab > close others) to a quick list and you can then invoke the quick list action via a keyboard shortcut.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With