How do I keep IntelliJ from closing my Editor Tabs automatically?

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


For recent versions on Mac, Configure Editor tabs is under enter image description here

In the Editor --> General --> Editor Tabs, Under Closing Policy, change the Tab limit as per your requirement

enter image description here