Tuesday, October 31, 2006

Rails Macro for JEdit

I have written a macro for JEdit that allows you to jump around from one related file to another in your Rails project. The behavior mimics some of the capability of the TextMate Rails bundle. This screencast shows the macro in action:

***Update - 07/04/08***
At long last I have finally decided to post this macro to a highly-available public repository. For the longest time, I have been hosting the zip file for this macro on my home network and many times the server was unavailable when someone needed it. No longer! You can download the macro from this github repo.

You'll want to copy the 'Rails' directory into your <home_dir>/.jedit/macros directory. You will need to have the Ruby and SideKick JEdit plugins as well as the "ruby" executable for your platform visible in the "path". This macro has been tested on Windows and Linux (OS X users will have to settle for TextMate ;-) ).

17 comments:

Anonymous said...

Excellent thanks, I just did a toggle view to controller macro, but this is way better!

Anonymous said...

congratulations for such a nice macro, but i cannot download it. Have you posted it somewhere else? Thank you

Anonymous said...

My home server must be off line at the moment and I am on travel. I have uploaded the macro file to this site: http://www.dead-yahoo.com/download.php?file=411384


--Mario

HawkERB said...

Many, many thanks! :)

Anonymous said...

Thanks, Mario for a great macros. I've tried it and find it very helpful! :)
I think, it'd be more convenient, if there were possibility to press C or M or H or L to switch to controller/model/helper/layout correspondingly. But I'm not apt in beanshell, so cannot get where to insert such event listener :(

Unknown said...

This is just excellent, thank you Mario!

Kudos and gratitude from Plymouth, MA

Unknown said...

I use HAML for my views and layouts.
At first, it appeared that this macro would not support views or layouts.
I edited the bsh file and added ".haml" as a suffix. This allowed me to jump to views, but would not automatically select the proper view if I were in a controller method. Further, I cannot jump to layouts. I suspect that this is due to .rhtml being hardcoded within the macro. Has anybody with more expertise than me extended this macro to include haml files properly?

Anonymous said...

hi, your links are dead.
could you reup ?

Anonymous said...

Sorry about that. Should be working now.

Anonymous said...

thanks !

Anonymous said...

Every link to this file I find is dead. I posted a message over at the jEdit community. Does anyone have this file they could send me?

Thank you very much,
Dave

Mario said...

Dave,

As luck would have it, I am once again on travel and unable to update the server that I use to store this macro for JEdit. I won't be back to fix this until Sunday (today is Friday). I would be happy to move the hosting of this macro. If you or anyone is aware of a central hosting site for Rails macros, please leave a reply post on this blog and I will see that the macro is moved there as soon as I can.

--Mario

Anonymous said...

I searched around for that sort of site and couldn't really find anything. I'd be more than willing to put it on my site and link to it. I'm just learning rails.

Dave

Anonymous said...

Or, perhaps I could start a site for hosting Rails macros?

Dave

Anonymous said...

Heavy sigh.

I really hate to be a pain, but when I try and download the file from Firefox, instead of the 404 I received previously now I get "... the source file could not be read".

Mario said...

Dave,

I just tried it (4:50 p.m. CST on Tuesday 6/17/08), and am able to download the zip for the macro. I am totally into moving it to a site for hosting Rails macros for JEdit. If you start such a site, please let me know.

--Mario

Anonymous said...

Thank you so very much, Mario. That really is a nice macro.

Will work on the site....