IntelliJ:如何从命令行打开现有的IntelliJ中的文件 [英] IntelliJ: how to open files in an existing IntelliJ from the command line

查看:2109
本文介绍了IntelliJ:如何从命令行打开现有的IntelliJ中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是有一个IntelliJ运行。有时候我想从IntelliJ外部打开一个文件。如果我在Finder中,我可以拖放一个文件到IntelliJ,但如果我在OS X上的命令行,我如何可以指示IntelliJ打开某个文件?我正在寻找类似于TextMate提供的 mate 命令的东西。

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.

推荐答案

p>编辑您的〜/ .bash_profile 添加以下内容,更改您要使用的IntelliJ版本的路径:

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"

然后从命令行打开文件 ij your-file.txt

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

这篇关于IntelliJ:如何从命令行打开现有的IntelliJ中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆