intellij-ideaintellij-13

Intellij IDEA: Pinned tabs, close will close. How to disable?


I have a hotkey for closing tabs, CTRL + W but it closes even pinned tabs.

So does the [X] on the tabs.

And so does the right click -> close tab.

Is this a bug?

It didn't use to be like this.

I am on intellij 13


Solution

  • There is a 3rd-party plugin available since 2016 that lets you disable closing pinned tabs:

    https://plugins.jetbrains.com/plugin/8442-a-prevent-pinned-tabs-from-closing-plugin--by-momomo-com

    It hides the X button from the tab. However you also have to manually update your key mapping:

    1. Open preferences
    2. select Keymap
    3. search "momomo" (the plugin author)
    4. select "Close Unless Pinned"
    5. Press CTRL+W (or CMD+W on macOS)

    Now you will be prevented from closing the tab via the keyboard or mouse, unless you unpin it first.

    screenshot of PhpStorm settings