Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut to Close Intellij File Tab

I love intellij's file tab but I can't seem to find a way to shortcut closing a tab similar to the behavior of ctrl + w in chrome. I can't find the option in the keymap editor. Am I missing something or is this not implemented?

I found this page but it doesn't include the action name. I would use ctrl + f4 but my window manager has that reserved and I would rather change it.

like image 239
ford prefect Avatar asked Mar 14 '16 16:03

ford prefect


People also ask

Is there a shortcut for closing a tab?

On Windows, Chromebook, or Linux, to quickly close an open Chrome tab, press the Ctrl+W shortcut on your keyboard. This will instantly close your tab. On Mac, press the Command+W shortcut to close an open tab in Chrome.

What is the shortcut to close all tabs in IntelliJ?

To close all opened tabs, select Window | Editor Tabs | Close All Tabs from the main menu.

What is Ctrl K in IntelliJ?

In Eclipse, if the cursor is over a word and you press Ctrl + K you will jump to the next occurrence of that word in the file. Is there a similar shortcut in IntelliJ? eclipse intellij-idea.


2 Answers

  1. Open Settings by hitting Ctrl+Alt+S
  2. Click: Keymap
  3. Search for: Close
  4. Under Main menu > Window > Editor Tabs, find Close.
  5. Right-click and click Remove Ctrl+F4.
  6. Right click and click Add Keyboard Shortcut
  7. Add your new custom Keyboard Shortcut.

IntelliJ will tell you if the shortcut clashes with another shortcut performing a different action.


Alternatively, open/edit your Linux Window Manager Settings and remove the Ctrl+F4 mapping to allow other programs like IntelliJ to make use of it.

like image 140
Harmelodic Avatar answered Sep 21 '22 21:09

Harmelodic


For PC-based keyboards, the shortcut to close tabs is CTRL + F4,
not to be confused with ALT+F4.

like image 24
Makoto Avatar answered Sep 20 '22 21:09

Makoto