Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a directory in PHPStorm or IntelliJ (or any JetBrains IDE) from the command line?

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.

like image 644
Jordan Brown Avatar asked Nov 29 '11 00:11

Jordan Brown


People also ask

How do I open a folder in Terminal in IntelliJ?

Open the Terminal tool window Alternatively, you can right-click any file (for example, in the Project tool window or any open tab) and select Open in Terminal from the context menu to open the Terminal tool window with a new session in the directory of that file.

How do I open IntelliJ from command prompt?

Firstly add a path of IntelliJ till bin to an environment variable. This will open IntelliJ with a given path. Show activity on this post. (Re)creating the idea shell command from the Tools menu works for IntelliJ 2019.

How do I open a folder in IDE?

In Visual Studio, click File > Open > Folder. Navigate to the folder, and click Select Folder. This opens the folder in Solution Explorer and displays its contents, files and any subfolders.

How do you open Jetbrains in Terminal?

We can open the terminal window with ⌥F12 on macOS, or Alt+F12 on Windows and Linux. The terminal supports all the same commands that the operating system supports. and press enter.


2 Answers

Use Tools -> Create command line launcher and then you can execute pstorm .

like image 179
Alex Avatar answered Sep 23 '22 00:09

Alex


Here's how I got IntelliJ Command-line launcher to work with MAC Sierra (v 10.12.2).

This works with IntelliJ IDEA:

  1. Tools -> Create Command-line Launcher.. enter image description here
  2. Replace 'idea' in the string '/usr/local/bin/idea' with whatever you wish.
    enter image description here (I use 'ij'), so for me its '/usr/local/bin/ij'.
  3. Open your terminal
  4. Navigate to the project/folder you want to open.
  5. Write the chars you wrote after 'bin/' and then '.' enter image description here

    For me its ij .

like image 38
Rickard Kamel Avatar answered Sep 20 '22 00:09

Rickard Kamel