我有一个非常方便的别名
ii='open . -a "IntelliJ IDEA"'
,它有助于从 cli 快速打开项目,从文件夹中执行 ii
。 IDE 配置为在选项卡中打开新项目,当我从 “文件→打开最近的” 菜单中打开新项目时,效果很好。但是当我使用别名打开时,它们总是在单独的窗口中启动。
您知道如何从 cli 打开项目到现有窗口吗?
谢谢
Settings | General | Prefer tabs | Always
。MacOS 13-14:
Settings | Desktop & Doc | Windows & Apps | Prefer tabs when opening documents | Always
如果您有 MacOS 11,请使用此 IDE 设置:
Preferences | Appearance & Behavior | System Settings | Open project in | Current window
如果您有 MacOS 12,请使用此 IDE 设置:
Preferences | Appearance & Behavior | System Settings | Open project in | New window
如果您有 MacOS 13: