Merb_editorkicker 0.2.0 released - invoke your favorite editor other than TextMate
Filed under: product on Sunday, December 21st, 2008 by kwa | No CommentsI have released merb_editorkicker 0.2.0.
This is a Merb plug-in which enables you to invoke your favorite editor (such as Emacs, Aptana, NetBeans, and so on) instead of TextMate when you clicked line number on Merb error page.
And this plug-in works on all platform. In other words, you can invoke your editor not only on Mac but also on Linx and Windows.
I believe that this will help you very much if you are not TextMate user.
Install
Install merb_editorkicker gem.
$ sudo gem install merb_editorkicker
Load merb_editorkicker in your ‘config/dependencies.rb’.
$ echo 'dependency "merb_editorkicker"' >> config/dependencies.rb
Finally, set ENV['EDITOR_KICKER'] in your ‘config/development.rb’
## for TextMate
app_dir = '/Applications/TextMate.app'
ENV['EDITOR_KICKER'] = "#{app_dir}/Contents/Resources/mate -l %s %s"
## for Emacs (Don't forget M-x server-start)
ENV['EDITOR_KICKER'] = "emacsclient -n +%s %s"
## for NetBeans
ENV['EDITOR_KICKER'] = "netbeans %2$s:%1$s"
## for EclipseCall plugin
ENV['EDITOR_KICKER'] = "java -jar eclipsecall.jar %2$s -G%1$s"
## other
ENV['EDITOR_KICKER'] = "open %2$s"
Usage
All you have to do is to click line number links on Merb error pages, and your favorite editor will be invoked to open file.
Note
- Don’t forget to type ‘M-x server-start’ if you are Emacs User.
- If you are using Aptana or Eclipse, you must install EclipseCall plugin. See README.txt for details.
- This plug-in works only on development mode and has no effect on production mode nor test mode.