Politics, Programming and Possibilities
28 Sep
Update: The repository has moved slightly, since the Rails.tmbundle got renamed to “Ruby on Rails.tmbundle”. The URL looks like this (no newlines):
http://macromates.com/
svn/Bundles/trunk/Bundles/Ruby on Rails.tmbundle/
Support/plugins/footnotes
This release of the TextMate Footnotes plugin has several new and helpful features:
I’ve also moved the project in to the TextMate Repository, so you can either get it with TextMate, or use subversion to get it directly here:
svn --username anon --password anon co http://macromates.com/
svn/Bundles/trunk/Bundles/Rails.tmbundle/
Support/plugins/footnotes footnotes
(Note: the subversion checkout command above should all be on one line.)notebook quotes movie themovies underwater sexunited movie theater artistvegas studio moviedownload veronica movie zemanovachicks music white moviewife swapping moviesxxx movie downloadsmovies 1001movies 911
35 Responses for "TextMate Footnotes v.1.6 Released"
Thank you very much for updating this! One thing that caught me off guard was the Show Sessions/Cookies/Params links weren’t working, then I realized it uses prototype and you need to include the javascript files (which I hadn’t done on that project yet). Everything else seems fine so far. Great job.
Thanks Ryan! I should be able to get the Prototype stuff out of there for anyone else who doesn’t use it. Glad you brought it up
Two small changes to make the html code valid:
textmate_backtracer.rb, line 55:
old: controller_url += “&line=
new: controller_url += “&line=
(encoded ampersand)
textmate_backtracer.rb, line 61:
old:
new:
(style tag with type and optional media attribute)
Duane: This plugin is so fantastic. Thank you so much for it!
The footnote ends up inserted into RJS as well. Try a page.insert_html() call from a controller method to see what I mean.
smeevil was raving about this in #rubyonrails but it wasn’t clear to me from reading this page what your plugin does. Smeevil summarized it nicely, I think: “it shows some links at the end of your page, which on click jump directly to the controller in textmate , or on errors jumps right to the error line in textmate etc, also outputs debug, logs etc for the particular page”
Hmm. I’m using edge rails and just to test this out I threw a syntax error in my controller.
However, on the error page it gives the following error:
/Users/chris/cart/app/controllers/products_controller.rb:11: parse error, unexpected ‘;’
fkj = 1.;
But the products_controller.rb isnt a link. Underneath this, the trace is displayed and the links DO work in textmate. Unfortunately though, the trace does not include the file with the error in it (just lists a bunch of rails libraries). Is there anyway to make the area above the trace also link to textmate if a path to a file is listed?
Thanks!
-Chris
Hey,
Cool plugin. One thing that would improve it — change the javascript links for sessions, cookies, etc to toggle display of the boxes rather than just showing them. (You’re already putting CSS stuff in , why not throw one function into a ?)
If you are running on the latest edge rails and now have .html.erb extensions for your views you’ll need to make a minor change to this plugin.
In the add_footnotes! method add “html.erb” to the list of extensions being checked to determine if the footnotes should be added.
Yikes. I want to install the rails plugin - but when i go to install plugins from within Textmate I get this:
/Applications/TextMate.app/Contents/SharedSupport/Bundles/Rails.tmbundle/Support/lib/rails/text_mate.rb:69:in `method_missing’: undefined method `filepath’ for TextMate:Module (NoMethodError) from /Applications/TextMate.app/Contents/SharedSupport/Bundles/Rails.tmbundle/Support/lib/rails/rails_path.rb:43:in `initialize’ from /Applications/TextMate.app/Contents/SharedSupport/Bundles/Rails.tmbundle/Support/bin/list_plugins.rb:25
I LOVE this thing now that I figured out how to install it. In retrospect it seems obvious…
I kept trying to put it in /Library/Application Support/TextMate/Bundles/ and then getting frustrated that no “Footnotes” bundle showed up in TextMate. I actually e-mailed Allen Odgaard (TextMate author) asking him how to do this, and he said it’s already built into the default TextMate distribution.
Going to the root directory of my Rails application and entering script/plugin install did the trick.
[...] This can get tedious rather quickly. I have found that the Footnotes plugin for Rails does wonders and increases my productivity dramatically. It turns all of the lines in the stack trace into clickable txmt:// links. TextMate registers itself with the OS X so that it receives all clicks of this type - a quick click on the stack trace will open the relevant file and place the cursor at the correct line. In addition, Footnotes adds some extremely useful debug information (and more TextMate links!) to the bottom of every view when the application is launched in the debug environment. [...]
Hi Duane,
I’m the guilty part!
Just tried to lock your repo minutes ago - sorry! (Being stupid is such a handicap, I tell you)
Duane! thanx for the great plugin.
Just discovered it, and lovin it already. The routes plugin Rick made might be a good fit with this one (discover routes?).
Don’t see you much on ror-talk lately. Hope you’re doing well.
Jodi(canadajodi)
If you get that error:
/Applications/TextMate.app/Contents/SharedSupport/Bundles/Rails.tmbundle/Support/lib/rails/text_mate.rb:69:in `method_missing’: undefined method `filepath’ for TextMate:Module (NoMethodError) from /Applications/TextMate.app/Contents/SharedSupport/Bundles/Rails.tmbundle/Support/lib/rails/rails_path.rb:43:in `initialize’ from /Applications/TextMate.app/Contents/SharedSupport/Bundles/Rails.tmbundle/Support/bin/list_plugins.rb:25
you need to install the plugin while you’ve got your rails application open in textmate.
Hi Duane,
Great plugin.
I’m starting to swap IDEs from textmate to Netbeans. Just wondering if you’d considered supporting Netbeans given its upcomingness in the Ruby IDE area? http://wiki.netbeans.org/wiki/view/Ruby
regards
Greg
Hi,
thank you for this very nice and powerfull plugin. I love it…
Stay hungry…
Adios Axel
The plugin as-is doesn’t work with HAML (http://haml.hamptoncatlin.com/). It’s a really easy fix, though…
Add “haml” to the array ["rhtml", "rxhtml"] on line 37 of vendor/plugins/footnotes/lib/textmate_footnotes.rb (in add_footnotes!).
Fantastic plugin, thank you very much!
best regards
c
I just tried to install footnotes and got this message. Please help!
cd /…/work/orlando; ruby script/plugin install http://macromates.com/svn/Bundles/trunk/Bundles/Rails.tmbundle/Support/plugins/footnotes
Installing…
Plugin not found: ["http://macromates.com/svn/Bundles/trunk/Bundles/Rails.tmbundle/Support/plugins/footnotes"]
Tom-
I got the same error message. The location of footnotes in the svn repository has changed. Try:
ruby script/plugin install -f http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%20on%20Rails.tmbundle/Support/plugins/footnotes/
(all on one line).
You can browse to the repository yourself to see what’s where:
[...] TextMate’s Ruby on Rails bundle has changed directories, and along with the Footnotes plugin. People are reporting that “script/plugin install” results in “Plugin not found: http://macromates.com/svn/Bundles/trunk/Bundles/Rails.tmbundle/Support/plugins/footnotes”. Indeed, it can now be found at: http://macromates.com/svn/Bundles/trunk/Bundles /Ruby%20on%20Rails.tmbundle/Support/plugins/footnotes [...]
[...] One very useful feature of Texmate that few people seem to know about is Textmate Footnotes. It’s a Rails plugin that adds this menu at bottom of your pages: [...]
An amazing plugin. No need to track back to the file. Just click and you are done.
Please update the svn info on the main article. I had to checkout the code from one of the comments.
Once again, thanks for such plugin. Keep up the work.
Is this supposed to work with edge-Rails 2.0? I just gave it a shot and was getting 500 errors in the browser, but what looked like appropriate output on the script/server terminal.
The “edge” version of the plugin is available at:
http://macromates.com/
svn/Bundles/trunk/Bundles/Ruby%20on%20Rails.tmbundle/
Support/plugins/footnotes-edge
The edge version of your plugin isn’t accounting for the new “index.html.erb” filenames in place of the old “index.rhtml”
I updated all the (rhtml|rxhtml|rxml|rjs) entries with the added extensions and it seems to work.
Using newest rails I get internal server error when the exception comes from the template.
(It works ok with controller/model exceptions)
no matter how I tweak the rhtml/html.erb thing
Also
rake test:plugins PLUGIN=footnotes
quits with
…
…ruby/1.8/ostruct.rb:49:in `initialize’: undefined method `each’ for :xhr:Symbol (NoMethodError)
any help appreciated
on a constructive note: I cleaned up and updated the relevant pages on the rails wiki
see http://wiki.rubyonrails.com/rails/pages/Textmate+Footnotes+Plugin
This worked for me:
http://pastie.caboo.se/111447
[...] Redit 是 TextMate Footnotes的vim版本. [...]
For Rails 2.0.2:
— template_error.rhtml (saved version)
+++ (current document)
@@ -15,7 +15,7 @@
-
+
-
+
You rock, this is the most awesome plugin. Thanks!
The svn repository currently includes a footnotes-edge which seems to help most of the problems with Rails 2.0.2 (I still had a little bit of trouble, for example with the edit layout link.)
Substitute footnotes-edge for footnotes in the URL.
I fixed it for use in Rails revision 8897: http://pastie.caboo.se/165263
[...] TextMate Footnotes v.1.6 Released (tags: textmate rails plugin rubyonrails plugins debugging footnotes debug development productivity programming tips) [...]
Very useful information
I see there are realy good tips. I am going to use some of them
Leave a reply