Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add instructions for configuring with sublime editor #81

Merged
merged 2 commits into from

3 participants

@westonplatter

update README with instructions.

@travisbot

This pull request passes (merged 72660e4 into c3dca85).

@romanvbabenko romanvbabenko merged commit 14586f0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 20 additions and 4 deletions.
  1. +20 −4 README.rdoc
View
24 README.rdoc
@@ -59,12 +59,13 @@ this code temporarily disables notes for all controllers
controller.action_name == 'edit' }
end
-If you are not using Textmate as text editor, in your environment.rb or
-in an initializer do:
+If you are not using Textmate as text editor, MacVim and Sublime Text 2 are also compatible.
- Footnotes::Filter.prefix = 'mvim://open?url=file://%s&line=%d&column=%d'
+*MacVim*
+
+In your environment.rb or in an initializer do:
-for MacVim
+ Footnotes::Filter.prefix = 'mvim://open?url=file://%s&line=%d&column=%d'
Where you are going to choose a prefix compatible with your text editor. The %s is
replaced by the name of the file, the first %d is replaced by the line number and
@@ -73,6 +74,21 @@ the second %d is replaced by the column.
Take note that the order in which the file name (%s), line number (%d) and column number (%d) appears is important.
We assume that they appear in that order. "foo://line=%d&file=%s" (%d precedes %s) would throw out an error.
+*Sublime* *Text* *2*
+
+1. Keep the Textmate prefix, Footnotes::Filter.prefix = 'txmt://open?url=file://%s&line=%d&column=%d'
+
+2. Install {subl-hanlder}[https://github.com/asuth/subl-handler]
+
+3. Open subl-handler. Go to preferences (SublHandler > Preferences), and point "Path to subl" to your installed instance. (EG, /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl). Note: do not escape the whitespaces, subl-handler accounts for those.
+
+4. Install {RCDefault}[http://www.rubicode.com/Software/RCDefaultApp]. It's OSX 10.2, but it works.
+
+5. Go to RCDefaultApp (OS System Preferences > DefaultApps). Go to URL section, select "tmxt" extension, and set default applicaiton to "SublHandler".
+
+
+*Footnotes* *Display* *Options*
+
By default, footnotes are appended at the end of the page with default stylesheet. If you want
to change their position, you can define a div with id "footnotes_holder" or define your own stylesheet
by turning footnotes stylesheet off:
Something went wrong with that request. Please try again.