Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Rails Mode For Emacs
Emacs Lisp
branch: master
Failed to load latest commit information.
.gitignore goto integration tests
ChangeLog initial commit of emacs-rails sources
History initial commit of emacs-rails sources
README spelling grammar and formatting
inflections.el initial commit of emacs-rails sources
predictive-prog-mode.el initial commit of emacs-rails sources
rails-bytecompile.el initial commit of emacs-rails sources
rails-cmd-proxy.el
rails-compat.el initial commit of emacs-rails sources
rails-controller-layout.el
rails-controller-minor-mode.el initial commit of emacs-rails sources
rails-core.el goto integration tests
rails-features.el
rails-find.el initial commit of emacs-rails sources
rails-fixture-minor-mode.el initial commit of emacs-rails sources
rails-functional-test-minor-mode.el initial commit of emacs-rails sources
rails-helper-minor-mode.el initial commit of emacs-rails sources
rails-layout-minor-mode.el initial commit of emacs-rails sources
rails-lib.el too many args to directories-in
rails-log.el initial commit of emacs-rails sources
rails-mailer-minor-mode.el initial commit of emacs-rails sources
rails-migration-minor-mode.el initial commit of emacs-rails sources
rails-model-layout.el initial commit of emacs-rails sources
rails-model-minor-mode.el initial commit of emacs-rails sources
rails-navigation.el removed dependencies on find-recursive
rails-plugin-minor-mode.el initial commit of emacs-rails sources
rails-project.el initial commit of emacs-rails sources
rails-rake.el initial commit of emacs-rails sources
rails-ruby.el initial commit of emacs-rails sources
rails-scripts.el initial commit of emacs-rails sources
rails-snippets-feature.el initial commit of emacs-rails sources
rails-speedbar-feature.el initial commit of emacs-rails sources
rails-test.el run individual integration tests fix
rails-ui.el goto integration tests
rails-unit-test-minor-mode.el initial commit of emacs-rails sources
rails-view-minor-mode.el initial commit of emacs-rails sources
rails-ws.el initial commit of emacs-rails sources
rails.el removed dependencies on find-recursive
snippet.el initial commit of emacs-rails sources
untabify-file.el initial commit of emacs-rails sources

README

This is a minor mode for editing "Ruby On Rails" code with
"Emacs". This minor mode makes your work much easier and user
friendly.


== Installation

Clone the project from github

  cd $HOME/.emacs.d/
  git clone git://github.com/youngnh/emacs-rails.git

emacs-rails requires Emacs ruby-mode, available in Ruby source
distributions and via most package managers.


After that you must add this code to $HOME/.emacs

  (add-to-list 'load-path "~/.emacs.d/emacs-rails")
  (require 'rails)

After that you can run Emacs. Almost all available actions are in the
menu [Ruby On Rails]. The snippets are in the menu [Ruby On
Rails-Snippets] divided into categories for convenience.

To change default settings, select [Ruby On Rails - Customize].

== First Acquaintance

Go to directory with your rails application and open any file in Emacs:

  cd $HOME/project/simple_rails_application
  emacs app/controllers/application.rb

"RoR" should be in the list of active minor-modes in the status
bar. This means that emacs-rails is enabled and ready to help.

Almost all actions are in the "RubyOnRails" menu. You can check it
out and try some of them. Don't forget, that menu will help you only the
first time. After that, you better use hot keys for effective work. Each
menu command's keychord is in parentheses after the menu item.

== Features

* TextMate-like snippets
* Display of colored log files
* Integration with script/generate and script/destroy (controller,
  model, scaffold, migration, etc)
* Integration with script/console and script/breakpointer
* Run rake C-c C-c r
* Quick start svn-status in RAILS_ROOT <F9>
* Documentation search using *ri* or *chm* file and Rails API
  reference in HTML <F1>
* Quick access to the main configuration files
* Automatic TAGS generation in RAILS_ROOT directory

=== Management of WEBrick/Mongrel

* Your can select Webrick, Mongrel or Lighttpd
* Start/stop applicaton server C-c C-c w s
* Automatic browsing on current action (from view or controller)
  C-c C-c w a

=== Navigation in RAILS_ROOT hierarchy

* Quick switch stylesheets, javascripts, migrations, layouts, helpers,
  controllers, models, observers, plugins
* In controller file: go to views, functional test, helper
  C-c <DOWN>
* Switch between action/view C-c <UP>
* Go to file in current line (example: cursor at line [redirect_to
  controller => :home, :action => "show"], will be open action "show"
  in "home" controller) C-<RET>
* Quick access to the main configuration files using menu

Other hot keys

* C-c C-c g g rails-nav:goto-migrate
* C-c C-c g j rails-nav:goto-javascripts
* C-c C-c g s rails-nav:goto-stylesheets
* C-c C-c g l rails-nav:goto-layouts
* C-c C-c g h rails-nav:goto-helpers
* C-c C-c g c rails-nav:goto-controllers
* C-c C-c g m rails-nav:goto-models
* C-c C-c g o rails-nav:goto-observers
* C-c C-c g p rails-nav:goto-plugins

=== ERb refactoring

* Create partial from selection C-c p
* Create helper from block  C-c b

=== Bugs

If you find errors, please drop us a line

= Links

* "HowToUseEmacsWithRails" http://wiki.rubyonrails.org/rails/pages/HowToUseEmacsWithRails
* "Emacs Wiki on RubyMode" http://www.emacswiki.org/cgi-bin/wiki/RubyMode
* "Emacs screencast" http://emacsonrails.drozdov.net/
* "Effective Emacs" http://steve.yegge.googlepages.com/effective-emacs
* "Emacs Snippets" http://www.kazmier.com/computer/snippet.el
* "Textmate Snippets" http://manual.macromates.com/en/snippets
Something went wrong with that request. Please try again.