0
votes

Intellij is my goto editor for .. just about everything . I tried sublime, vscode, adam and others.. and I do always come back to IJ.

In the past I had been able to use the command line launcher /usr/local/bin/idea and it would open a general file in the currently opened Intellij project. Split second to open. That is not working presently : instead a new Intellij window/application is launched for the sole purpose of editing maybe a small text file. This can take minutes and lots of memory.

The command line options to the launcher are v limited and do not include specifying "open in new window" or not:

$idea --help
Usage:
  /usr/local/bin/idea -h | -? | --help
  /usr/local/bin/idea [project_dir]
  /usr/local/bin/idea [-l|--line line] [project_dir|--temp-project] file[:line]
  /usr/local/bin/idea diff <left> <right>
  /usr/local/bin/idea merge <local> <remote> [base] <merged>

I would also mention: I do want separate windows for Intellij projects so do not want to reset this option under Appearance & Behavior | System Settings | Project Opening:

enter image description here

Also: note there is a similar question here Edit non-project files in IntelliJ but that question does require specific project-related capabilities and does not answer my question. My question is for opening general text files.

1

1 Answers

0
votes

A partial solution is to use the --temp-project command line option. It creates an unnecessary additional window but does not open an entirely new Application. It's pretty quick. E.g. for

  idea --temp-project zoo.data

we get a project with that one file:

enter image description here

I'd still prefer to open the arbitrary file within the currently opened Project - which did happen in the past.