How to open a file from terminal? (Linux)

Does any one know how can I open a file in my existing instance of idea from the terminal in Linux?

I.e. running "open_in_idea example.txt" would open example.txt in my existing instance of idea (not start a new instance of idea).


In the Tools menu you'll find a command "Create Command-line Launcher...". Select that, tell it where to save the script (put it in a directory that's in your PATH, of course) and you can use that script to open files or projects. Projects are opened by specifying the directory that contains the project's .idea subddirectory.

In my experience, you have to export a new version of script every time there's a non-patch release.

Randall Schulz


Please sign in to leave a comment.