122

When opening more than 10 Editor Tabs, IntelliJ automatically closes my least used Tab each time I open a new Tab.

How can I increase this limit?

More recent IntelliJ settings are accessed differently than older versions.

Heather92065
  • 5,693
  • 6
  • 27
  • 39
  • 1
    Possible duplicate of [How can I stop RubyMine/IntelliJ from closing my buffers?](http://stackoverflow.com/questions/25271631/how-can-i-stop-rubymine-intellij-from-closing-my-buffers) – Amos M. Carpenter May 19 '16 at 03:10
  • 1
    Similar but I doubt anyone would find it compared to this question. – Stephane Grenier Oct 25 '19 at 02:39
  • 1
    I was wondering, WHEN and why i closed some files. IntelliJ was closing stuff without asking. Stupid features sold as smart ones... – fresko Feb 19 '20 at 13:52

2 Answers2

190

Change the Tab Limit under the Tab Closing Policy settings.

Open your IntelliJ settings: Select File -> Settings -> Editor -> General -> Editor Tabs.

Look for Tab Closing Policy -> Tab Limit and change the value to a higher integer.

You can also select to either close non-modified files first or less frequently used files first once your tab limit has been reached.

enter image description here

Xavier Guihot
  • 32,132
  • 15
  • 193
  • 118
Heather92065
  • 5,693
  • 6
  • 27
  • 39
1

Adding an answer to help anyone else with a similar problem. OSX+Catalina on JetBrains/PyCharm was having closing all tabs when I lost focus on the application. When I came back the "Synchronization" action happened (top right circle arrow spins) and all windows are reset (many closed as a result). My fix was to disable in the settings. Appearance & Behavior > System Settings > Disable everything under the "Synchronization" section. You may need to seek out other "sync" options in settings.

Marc
  • 1,487
  • 14
  • 21