Skip to content
Browse files

Merge pull request #81 from westonplatter/master

add instructions for configuring with sublime editor
  • Loading branch information...
2 parents c3dca85 + 72660e4 commit 14586f071bfda23e40b3c7a657519d40faac227c @romanvbabenko romanvbabenko committed
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:

0 comments on commit 14586f0

Please sign in to comment.
Something went wrong with that request. Please try again.