Skip to content

Instantly share code, notes, and snippets.

@jtsagata
Created July 12, 2012 00:27
Show Gist options
  • Save jtsagata/3094685 to your computer and use it in GitHub Desktop.
Save jtsagata/3094685 to your computer and use it in GitHub Desktop.
Linux rails-footnotes sublime-text-2
copy handler to /usr/local/bin
copy desktop file to /usr/share/applications
sudo update-desktop-database
if defined?(Footnotes) && Rails.env.development?
Footnotes.run!
Footnotes::Filter.prefix = 'subl://%s:%d'
end
[Desktop Entry]
Name=SBLHandler
GenericName=SBLHandler
Comment=Open subl links in Sublime
TryExec=sublHandler
Exec=sublHandler %u
Terminal=false
Type=Application
MimeType=x-scheme-handler/subl
NoDisplay=true
#!/bin/bash
FILE=$1
FILE=${FILE/subl\:\/\//}
sublime-text-2 $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment