Politics, Programming and Possibilities
13 May
After James Cox sent me a patch to give TextMate Footnotes a much improved look, and my co-worker hacked something else up to get it to cooperate with our CSS and layout, I realized that there needed to be something done about this mess
In this release of Footnotes, you have a lot more flexibility in how the CSS styles will affect the output. For example, everything has an “id” tag, and several elements have a CSS class. In addition, the default styling is much improved, so you may not even want to change the styles. Note: If you’d like to use your own styles, turn off the automatic styles by adding this config line to the bottom of your environment.rb file: FootnoteFilter.no_style = true
Also, I’ve added some debug info to the footnotes. Now, you can view the params or session details by toggling the appropriate fieldset.
Get it using subversion at svn://syncid.textdriven.com/svn/opensource/textmate_footnotes/trunk, or install it with TextMate if you’re using the plugin installer that comes with the Rails bundle. (You need to be using subversion for this as well, unless you just want to wait until the next release of TextMate).
Update: Pete Yandell caught a bug for me early on–the controller URL leading back to TextMate had a doubled prefix. It’s fixed now. (Thanks, Pete.)
8 Responses for "TextMate Footnotes, Revisited (Version 1.2 Released)"
Grabbed the new version, and it definitely looks nicer, but the Edit Controller File link is broken in my project:
txmt://open?url=file://txmt://open?url=file:///Users/pete/Desktop/through/app/controllers/users_controller.rb&line=23
(The Edit View File link doesn’t have the same problem.)
I’ll have more of a dig later and see if I can work out what’s happening.
Yep, it’s a bug. In textmate_footnotes.rb:
textmate_prefix = “txmt://open?url=file://”
controller_url = “#{textmate_prefix}#{controller_filename}”
controller_url += “&line=#{controller_line_number + 1}” if index_of_method
…
Edit Controller File
so textmate_prefix is being stuck on the front of the controller URL twice.
Oops…that last comment needs an edit to escape the link tag.
Got it, thanks.
Hi,
I have a couple of problems using this plugin. The ’show session’ and ’show params’ links both point only to # on the page on which there are displayed (i.e. nothing). I’m not sure why.
Also, the Edit Controller and Edit View both work well for pages that don’t have errors, but for error pages the links to the line number of the error are in this form: “txmt://open?url=file://script/../config/../app/views/releases/index.rhtml&line=6″ which just opens a blank new file in textmate. So for some reason the real full path of the file isn’t being figured out and passed off to Textmate. This can be corrected by changing lines 25 and 26 in textmate_backtracer.rb : I uncommented line 25 and on line 26 I change the url to read txmt://open?url=file://#{file}&line=#{line_number}’>#{line_number}
Thanks for the awesome plugin.
I’ve been wanting to get this to work for awhile. What am I doing wrong: the footnote html appears *below* the final tag.
Regarding the problem I mentioned above with the ’show session’ and ’show params’ links, they use javascript and require the tag. I don’t know if that was documented somewhere and I just missed it, but there you go.
Above comments filtered out the tag I meant to include. It’s javascript_include_tag :defaults
Leave a reply