如何使用 Sublime Text 2 打开 rails_footnotes 文件? [英] How can I make rails_footnotes open files using Sublime Text 2?

查看:41
本文介绍了如何使用 Sublime Text 2 打开 rails_footnotes 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是在问如何告诉脚注如何做到这一点 - 我在 initializers/footnotes.rb 文件中使用了这一行:

I'm not asking how to tell footnotes how to do this - I'm using this line in the initializers/footnotes.rb file:

Footnotes::Filter.prefix = 'txmt://open?url=file://%s&line=%d&column=%d'

我的问题是应该用什么来代替 txmt://open?...?我试过 subl://sblm:// 但没有任何乐趣.是否与 open?url= 等有关?

My question is what should go in place of the txmt://open?...? I've tried subl:// and sblm:// but no joy. Is it something to do with the open?url= etc?

推荐答案

subl-handler 通过解释 txmt url 并将它们转发到 Sublime 来工作.如果你和我一样,有 TextMate 或任何其他应用程序当前响应 txmt,那么 subl-handler 将永远不会运行,也无法帮助你.如果是这种情况,您需要像 RCDefaultApp 这样的实用程序将 txmt url 的默认处理程序从 TextMate(或当前的任何内容)更改为 subl-handler.

subl-handler works by interpreting txmt urls, and forwarding them to Sublime. If you, like me, have TextMate or any other application currently responding to txmt, then subl-handler will never run, and won't be able to help you. If that's the case, you need a utility like RCDefaultApp to change the default handler for txmt urls from TextMate (or whatever it currently is) to subl-handler.

因此,完整说明(根据 此处)是:

So, the full instructions (per here) are:

  1. subl-handler 项目的 Github 存储库 安装 &配置子处理程序
  2. 安装 RCDefaultApp
  3. 打开 RCDefaultApp 首选项窗格,并告诉它对 txmt URL 使用 subl-handler(不是 Sublime).
  1. Github repo for subl-handler project Install & configure subl-handler
  2. Install RCDefaultApp
  3. Open the RCDefaultApp preference pane, and tell it to use subl-handler (not Sublime) for txmt URLs.

这篇关于如何使用 Sublime Text 2 打开 rails_footnotes 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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