IntelliJ: how to open files in an existing Intelli

2020-02-17 08:16发布

I always have an IntelliJ running. Sometimes I want to open a file from outside IntelliJ. I can drag and drop a file to IntelliJ if am in the Finder, but if I am on the command line on OS X, how can I instruct IntelliJ to open a certain file? I am looking for something similar to the mate command provided by TextMate.

3条回答
贼婆χ
2楼-- · 2020-02-17 08:57

Edit your ~/.bash_profile adding the following, changing the path to version of IntelliJ you'd like to use:

alias "ij=open -a /Applications/IntelliJ\ IDEA\ 9.0.2.app"

Then from the command line, open files with ij your-file.txt.

查看更多
叛逆
3楼-- · 2020-02-17 08:58

It's actually already implemented in the linux and OS X version of IntelliJ IDEA.

Tools > Create Command-line Launcher...

Not sure it's available for windows.

查看更多
成全新的幸福
4楼-- · 2020-02-17 09:22

idea is the command you are looking for.

At least if you install "IntelliJ IDEA Ultimate", it will create the command idea by default in /usr/local/bin/

查看更多
登录 后发表回答