Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make rails_footnotes open files using Sublime Text 2?

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'

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?

like image 822
Jules Copeland Avatar asked Feb 24 '12 17:02

Jules Copeland


2 Answers

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. 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.
like image 156
Taavo Avatar answered Nov 12 '22 13:11

Taavo


Sublime Text 2 doesn't have a protocol handler. However, you can map textmate's txmt to Sublime Text using this app: https://github.com/hiddenbek/subl-handler

There is also a Sublime Text plugin that adds a sblm: url handler (Windows-only): https://bitbucket.org/sublimator/sublimeprotocol/src/

like image 45
Liam Cain Avatar answered Nov 12 '22 14:11

Liam Cain