ave*_*net 47 macos command-line intellij-idea
我总是运行IntelliJ.有时我想从IntelliJ外面打开一个文件.如果我在Finder中,我可以将文件拖放到IntelliJ,但如果我在OS X的命令行上,我如何指示IntelliJ打开某个文件?我正在寻找类似于mateTextMate提供的命令的东西.
Tim*_*nin 80
它实际上已经在IntelliJ IDEA的linux和OS X版本中实现.
Tools > Create Command-line Launcher...
Run Code Online (Sandbox Code Playgroud)
不确定它是否适用于Windows.
ave*_*net 34
编辑~/.bash_profile添加以下内容,更改您要使用的IntelliJ版本的路径:
alias "ij=open -a /Applications/IntelliJ\ IDEA\ 9.0.2.app"
Run Code Online (Sandbox Code Playgroud)
然后从命令行打开文件ij your-file.txt.
如果你想在idea中从内部终端打开文件,请使用以下命令并按CTRL+ENTER:
open path/of/your/file
Run Code Online (Sandbox Code Playgroud)
绝对路径和相对路径都支持。
| 归档时间: |
|
| 查看次数: |
15061 次 |
| 最近记录: |