Geany 或 Gedit 是否像 Textmate 使用 txmt:// 那样提供浏览器协议?

Ric*_*ich 5 gedit programming

Mac 上的 Textmate 可以绑定 txmt 协议,这意味着开发框架(例如 Play Framework)可以配置为使用它来显示错误消息。如果出现堆栈跟踪,则堆栈跟踪的每一行都是格式的 URL(我猜):

txmt:///home/myuser/projects/myproject/ProblemFile.java:123
Run Code Online (Sandbox Code Playgroud)

(其中 123 是行号)。

单击此按钮可在 Textmate 中打开文件。

这可以用 Gedit、Geany 或其他程序员的文本编辑器实现吗?

Mat*_*don 4

可以在 Gnome 中轻松创建新的协议处理程序,您所要做的就是在 gconf 中添加一些键。

在终端中,输入:

gconftool-2 -s /desktop/gnome/url-handlers/foo/command '/path/to/app %s' --type String
gconftool-2 -s /desktop/gnome/url-handlers/foo/enabled --type Boolean true
Run Code Online (Sandbox Code Playgroud)

将两行中的 foo 替换为您要注册的协议,将 /path/to/app 替换为您要运行的应用程序的路径。(来自: http: //kb.mozillazine.org/Register_protocol#All_Firefox_versions