开发者

Open file in editor from browser, on Mac

I'd like to have a link which allows me to open a file in my favorite IDE. Textmate registeres it's own protocol txmt://open/?url=file://%file&line=%line and it works fine, but I can't find out how to open the file in some other application (for example NetBeans).

This probably requires registering some protocols and setting my开发者_如何学Python browser - I'd like to register it on Chrome.


It doesn't appear to be difficult to register a system-wide URL handler for a protocol you design. In your handler you can send the file on to your IDE. The handler can be Cocoa based or applescript.

For a Cocoa solution, see this post. For a real world Cocoa example, you can look at bwana.

For an applescript solution, see this post or this post for a start.


Try using http://www.rubicode.com/Software/RCDefaultApp/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜