Is there a way to open up a directory in PHPStorm or an equivalent Jetbrains IDE from the command line? For example, in Textmate, I would just do:
mate .
to open the working directory.
Is there a way to open up a directory in PHPStorm or an equivalent Jetbrains IDE from the command line? For example, in Textmate, I would just do:
mate .
to open the working directory.
Use Tools -> Create command line launcher
and then you can execute pstorm .
Here's how I got IntelliJ Command-line launcher to work with MAC Sierra (v 10.12.2).
This works with IntelliJ IDEA:
Write the chars you wrote after 'bin/' and then '.'
For me its ij .
On OS X: open -a 'phpstorm.app' file-or-folder
Here is the menu entry for v2016.2
:
After that you can open folders with pstorm {myfolder}
.
Hope it helps.
For PhpStorm on Windows:
Add the PHPStorm's installation path to the Environment Variables "PATH" variable,
Scroll to the project folder in the command line
Issue the command phpstorm64.exe .
if it is 64 bit machine or phpstorm.exe .
for 32 bit machine.
I presume the same strategy will work for IntelliJ as well.
So the method Tools > Create command line launcher...
no longer exists in OSX Intellij 2019.1
You can manually make this change via:
vim /usr/local/bin/idea
Change these lines appropriately from old version to new. should be something like this:
RUN_PATH = u'/Users/blahblah/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/191.6183.87/IntelliJ IDEA.app'
CONFIG_PATH = u'/Users/blahblah/Library/Preferences/IntelliJIdea2019.1'
SYSTEM_PATH = u'/Users/blahblah/Library/Caches/IntelliJIdea2019.1'
If you don't know the new path then run something like:
ls /Users/blahblah/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U
or manually navigate via finder, then drag/drop the IntelliJ IDEA.app
icon from finder into your cli to copy across the full path.
On MacOs edit ~./bash_profile add this line
alias pst="open -a 'phpstorm.app'"
now you can open phpstorm in a directory with
pst .