Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to close other tabs in IntelliJ using keyboard shortcut?

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.

enter image description here

like image 226
k13i Avatar asked Nov 06 '25 21:11

k13i


2 Answers

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.

like image 160
Matsemann Avatar answered Nov 08 '25 23:11

Matsemann


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.

like image 39
glytching Avatar answered Nov 09 '25 00:11

glytching



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!