Open a file using command line launcher in the same projet where you execute the command

Prior to 2020.1 when inside PhpStorm I was able to open any file by just typing phpstorm /path/to/a/file in IDE's terminal. Now with the new "LightEdit" feature the command opens a new window if the file is from outside of the project directory.

I know, I know. The first question that comes to mind is why I used the command line launcher instead utilizing the IDE for this, by for example pressing Ctrl + Shift + N and typing the path. The answer is simple: I have many shell scripts that depend on this feature. To give you an example: a script that creates and opens a database console with the name identical with the current git branch.

Is there a way to change this behaviour (I don't care for the "LightEdit-phpstorm-is-your-new-notepad" feature in the least)?

 

 

6 comments
Comment actions Permalink

Here's my temporary workaround:

sudo snap remove phpstorm
sudo snap install phpstorm --channel=2019.3/stable --classic

0
Comment actions Permalink

There is a better way indeed.

Please open "Help > Find action", type "Registry" there and switch off the "light.edit.file.open.enabled" option in Registry editor, that should help. 

2
Comment actions Permalink

Exactly the thing I was looking for. Thank you!

0
Comment actions Permalink

Should be a bug, this feature was NOT ready to ship and I don't know anyone who wants this by default.

 

When I use on my work machine (macOS 10.15.6) the new window flashes incessantly, and the VIM emulator is completely borked making opening files this way virtually unusable. 

0
Comment actions Permalink

Gabe, yep, the LightEdit mode doesn't have IdeaVim support yet: https://youtrack.jetbrains.com/issue/VIM-1985

0
Comment actions Permalink

@Gabe

Since next major 2020.2 version you can pass an extra command line switch and it will ensure that the file is opened in a project and not LightEdit mode (https://stackoverflow.com/a/62626486/783119)

0

Please sign in to leave a comment.