Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are useful Emacs features for Rails development

What Emacs feature(s), packages, add-ons, etc. helps you in your daily Ruby On Rails development?

like image 802
msorc Avatar asked May 04 '10 15:05

msorc


2 Answers

Previous versions of both emacs-rails mode, and Rinari(the two most popular modes for Rails development) were very feature rich, but bloated and cumbersome. To maintain a small, clean, reliable, functional, and hackable core Rinari will shun much of the “bells and whistles” type functionality. However that is not to say that these extra goodies might not be useful.

This page should serve as marshaling point for links to some other tools/packages that work well with Rinari and Rails in general. If you have any ideas for additions to this list, or for new Rinari features please let us know at http://groups.google.com/group/emacs-on-rails.

Essential Major Modes for working with Rails

  • Ruby Mode, and some other general Ruby-Emacs goodies can be found in the /misc directory of your ruby distribution and at http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/misc/ (it's also bundled by default with Emacs 23.1)

  • YAML Mode http://www.emacswiki.org/cgi-bin/wiki/YamlMode

  • CSS Mode http://www.emacswiki.org/cgi-bin/emacs/css-mode-simple.el

  • JavaScript Mode http://www.emacswiki.org/cgi-bin/wiki/JavaScriptMode#toc1 Other Tools

  • Rhtml Mode Minor Mode for editing rhtml files (without MMM-Mode) see rhtml-Mode

  • Snippets http://code.google.com/p/yasnippet/ and Rails snippets http://github.com/eschulte/yasnippets-rails/tree/master

  • ruby-debug support http://groups.google.com/group/emacs-on-rails/browse_thread/thread/dfaa224905b51487

  • ido Mode http://www.emacswiki.org/cgi-bin/wiki/InteractivelyDoThings

  • nxhtml-mode - the best mode for web development in Emacs - a great alternative of the rhtml-mode for editing erb files amongst many other things.

Most of this stuff is copied from Rinari's documentation. As you might have guessed I prefer Rinary over emacs-rails. Looking at the activity of both projects - emacs-rails hasn't had any changes for about an year, while rinary is still being developed.

like image 55
Bozhidar Batsov Avatar answered Oct 03 '22 19:10

Bozhidar Batsov


I use emacs-rails and some modes to edit css, js (espresso-mode), haml, sass, yaml and a snippet mode (yas-snippet). For an overview look into the emacs wiki pages on Ruby on Rails..

like image 30
gregor Avatar answered Oct 03 '22 18:10

gregor