当intellij想法开始时如何防止打开最后的项目

pop*_*lka 250 intellij-idea android-studio

默认情况下,intellij idea在启动时打开最后一个项目.如何在不打开最后项目的情况下打开intellij想法?

Tom*_*icz 330

IntelliJ 14,15,16:

Settings -> Appearance & Behaviour -> System Settings -> Reopen last project on startup
Run Code Online (Sandbox Code Playgroud)

先前:

Settings -> General -> Startup/shutdown -> Reopen last project on startup.
Run Code Online (Sandbox Code Playgroud)

  • 在14中,现在是_Settings - >外观和行为 - >系统设置_.或者您可以使用搜索功能更轻松地找到它. (13认同)
  • 也适用于来自JetBrains的其他IDE,例如CLion. (2认同)

Pat*_*kes 133

如果出于任何原因需要在不使用UI的情况下更改此设置(例如,如果IDEA在打开项目时挂起),您可以在中找到设置,例如

/.IntelliJIdea10/config/options/ide.general.xml
Run Code Online (Sandbox Code Playgroud)

该文件的位置记录在http://devnet.jetbrains.net/docs/DOC-181中

您需要更改(或添加)的具体设置是

<application>
  <component name="GeneralSettings">
    <option name="reopenLastProject" value="false" />
  </component>
</application>
Run Code Online (Sandbox Code Playgroud)

苹果电脑

在最新版本的IntelliJ中,此文件在Mac上的位置是

~/Library/Preferences/IntelliJIdea2018.2/options/ide.general.xml
Run Code Online (Sandbox Code Playgroud)

  • OSX:__sed -i.bak的/"reopenLastProject"value ="true"/"reopenLastProject"value ="false"/'〜/ Library/Preferences/IntelliJIdea13/options/ide.general.xml__ (4认同)
  • 如果缺少则添加行:`<option name ="reopenLastProject"value ="false"/>` (4认同)
  • 在Idea 2020.1中,路径被挂到~/.config/JetBrains/IntelliJIdea2020.1/options/ide.general.xml (4认同)
  • 在IntelliJ 17中,当我需要阻止启动时重新打开项目时,编辑`recentProjects.xml`文件中的`&lt;option name =“ openPaths”&gt;`标记对我有用。 (3认同)
  • 在Mac上,2017年及以后的路径应该是这样的:`〜/ Library/Preferences/IntelliJIdea2017.2/options/ide.general.xml` (2认同)
  • 还有一个命令行选项“dontReopenProjects”:https://www.jetbrains.com/help/idea/working-with-the-ide-features-from-command-line.html#arguments (2认同)

tak*_*a15 21

如果您只是尝试启动 IntelliJ 一次而不打开任何以前的项目(例如,由于 IntelliJ 在特定项目中崩溃),您可以使用dontReopenProjects命令行中的选项。

例子:

C:\dev\ide\IntelliJ IDEA Community Edition 2020.2\bin\idea64.exe dontReopenProjects
Run Code Online (Sandbox Code Playgroud)

注意:您还可以使用许多其他有用的命令行选项,例如noSplashdisableNonBundledPlugins


源 CLI 文档(感谢 mikebridge 在对此答案的评论中指出):https ://www.jetbrains.com/help/idea/working-with-the-ide-features-from-command-line.html #参数


aso*_*kan 14

对于Mac 10.9(Mavericks)上的Intellij 13,它也位于〜/ Library/Preferences/IntelliJIdea13/options/ide.general.xml中.(我没有足够的声誉来推荐尼古拉斯的回答).


Nic*_*ell 12

在Mac上,文件位于 ~/Library/Preferences/IntelliJIdea12/options/ide.general.xml

然后将reopenLastProject选项设置为false.


hev*_*evi 12

最快的方法是

CTRL + SHIFT +一

然后输入

重开

在此输入图像描述


Ann*_*rom 10

我使用这个路径在VI中打开了这个文件:

〜/库/首选项/ IdeaIC13 /选项/ ide.general.xml

并更改了此值:

<option name="reopenLastProject" value="true" />
Run Code Online (Sandbox Code Playgroud)

<option name="reopenLastProject" value="false" />
Run Code Online (Sandbox Code Playgroud)


小智 9

IntelliJ 2016.x现在将此信息保存在自己的文件中.在我的MacBook Pro w/OSX上:

~/Library/Preferences/IntelliJIdea2016.2/options/recentProjects.xml
Run Code Online (Sandbox Code Playgroud)

如果IntelliJ在启动时挂起,则强制退出应用程序,然后将此文件重命名为"recentProjects.xml.bak".

重启后,您将获得用于创建或打开项目的选项屏幕.

注意:实际路径可能会有所不同,具体取决于您安装的IntelliJ版本,例如.

IntelliJIdea2016.1/ IntelliJIdea2016.2/ IntelliJIdea2016.3/


ahm*_*l88 9

对于新的 IntelliJ 版本 [如 2020.3.2 ...]

在此输入图像描述


Vla*_*nov 8

只需勾选复选框:

Settings -> General -> Reopen last project on startup
Run Code Online (Sandbox Code Playgroud)

这是为了想法10.


Evd*_*afa 7

在IntelliJ 14中它是:

设置 - >外观和行为 - >系统设置 - >启动/关闭 - >在启动时重新打开上一个项目

您可以按CTL + ALT + S进入设置窗口.


Jor*_*sys 5

Intellij Idea or Android Studio:

From the menu go to :

File > Settings >Appearence & Behavior > System Settings.

disable the option:

Reopen last project on startup

图像描述入门