mjs
mjs

Reputation: 22379

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

Upvotes: 8

Views: 2963

Answers (3)

andrewtweber
andrewtweber

Reputation: 25579

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

Upvotes: 8

ajp15243
ajp15243

Reputation: 7960

Pinning a tab in IntelliJ simply means it will not automatically close when you have exceeded the maximum number of allowed open tabs (the value of which you can edit, but is 10 by default). It has nothing to do with your own actions to close it (except for the Close All but Pinned option in the right-click context menu on tabs).

Upvotes: 6

Software Engineer
Software Engineer

Reputation: 16140

I don't think it's a bug. I don't remember it being any other way, and I've used IntelliJ since the first release (I suppose that I may not have been paying attention though). Pinned windows simply stay visible when inactive, whilst unpinned windows will close automatically.

Upvotes: 2

Related Questions