Search code examples
macosintellij-ideacommand-line-interface

IntellijIDEA: how to open a project in a tab instead of a new window from OSX cli?


I have a very convenient alias ii='open . -a "IntelliJ IDEA"' that helps to quickly open projects from cli doing ii from a folder. The IDE is configured to open new projects in tabs and it works well when I do it from the "File → Open Recent" menu. But when I open using the alias, they always start in separate windows.

Do you know how to open projects from cli into an existing window instead?

Thanks


Solution

    1. MacOS 11-12: set Settings | General | Prefer tabs | Always in your MacOS settings.

    MacOS 13-14: Settings | Desktop & Doc | Windows & Apps | Prefer tabs when opening documents | Always

    1. If you have MacOS 11, use this IDE setting: Preferences | Appearance & Behavior | System Settings | Open project in | Current window

    2. If you have MacOS 12, use this IDE setting: Preferences | Appearance & Behavior | System Settings | Open project in | New window