/ emacs.d / rails / README
README
  1  It is minor mode for editing "Ruby On Rails":ror code with
  2  "Emacs":emacs. This minor mode makes your work much easier and user
  3  friendly
  4  
  5  
  6  == Instalation
  7  
  8  You need download last release from RubyForge page
  9  "http://rubyforge.org/projects/emacs-rails" and and unpack
 10  it to directory containing libraries of Emacs, by default it's
 11  $HOME/.emacs.d/
 12  
 13  You can also use SVN
 14  
 15    cd  $HOME/.emacs.d/
 16    svn co svn://rubyforge/var/svn/emacs-rails/trunk emacs-rails
 17  
 18  Download and install required libraries
 19  
 20  * "http://www.kazmier.com/computer/snippet.el":snippets
 21  * "http://www.webweavertech.com/ovidiu/emacs/find-recursive.txt":frecursive
 22  
 23  *Alert:* From 0.44 release emacs-rails will require the
 24   "inf-ruby":inf-ruby.
 25  
 26  After that you must add this code in $HOME/.emacs
 27  
 28    (setq load-path (cons "~/.emacs.d/rails" load-path))
 29    (require 'rails)
 30  
 31  For Windows users: you can use your help in CHM format (the default
 32  *ri*).  This will require utility "KeyHH":keyhh. And add to a file
 33  .emacs
 34  
 35    (setq rails-chm-file "full_path_to_rails_chm_manual")
 36  
 37  After that you can run Emacs. Almost all available actions are in the
 38  menu [Ruby On Rails]. The snippets are in the menu [Ruby On
 39  Rails-Snippets], for the convenience, they are divided into
 40  categories.
 41  
 42  To change default setting, select [Ruby On Rails - Customize].
 43  
 44  == First Acquaintance
 45  
 46  Go to directory with your rails application and open any file in Emacs:
 47  
 48    cd $HOME/project/simple_rails_application
 49    emacs app/controllers/application.rb
 50  
 51  There must be "RoR" sign in the list of active minor-modes in status
 52  bar. Thi means, that emacs-rails is enabled and ready to help you in
 53  your not so easy work.
 54  
 55  Almoust all actions are in the "RubyOnRails" menu. You can check it
 56  out and try some of them. Don't forget, that menu will help you only
 57  first time. After that you better use hot keys for effective work, you
 58  can find them in the brackets.
 59  
 60  == Features
 61  
 62  * TextMate-like snippets
 63  * Display of colored log files
 64  * Integration with script/generate and script/destroy (controller,
 65    model, scaffold, migration, etc)
 66  * Integration with script/console and script/breakpointer
 67  * Run rake %(key)C-c C-c r%
 68  * Quick start svn-status in RAILS_ROOT %(key)f9%
 69  * Documentation search using *ri* or *chm* file and Rails API
 70    reference in HTML %(key)f1%
 71  * Quick access to the main configuration files
 72  * Automatic TAGS generation in RAILS_ROOT directory
 73  
 74  === Management of WEBrick/Mongrel
 75  
 76  * Your can select Webrick, Mongrel or Lighttpd
 77  * Start/stop application server %(key)C-c C-c w s%
 78  * Automatic browsing on current action (from view or controller)
 79    %(key)C-c C-c w a%
 80  
 81  === Navigation in RAILS_ROOT hierarchy
 82  
 83  * Quick switch stylesheets, javascripts, migrations, layouts, helpers,
 84    controllers, models, observers, plugins
 85  * In controller file: go to views, functional test, helper
 86    %(key)C-down%
 87  * Switch between action/view %(key)�-up%
 88  * Go to file in current line (example: cursor at line [redirect_to
 89    controller => :home, :action => "show"], will be open action "show"
 90    in "home" controller) %(key)C-RET%
 91  * Quick access to the main configuration files using menu
 92  
 93  Other hot keys
 94  
 95  * %(key)C-c C-c g g% rails-nav:goto-migrate
 96  * %(key)C-c C-c g j% rails-nav:goto-javascripts
 97  * %(key)C-c C-c g s% rails-nav:goto-stylesheets
 98  * %(key)C-c C-c g l% rails-nav:goto-layouts
 99  * %(key)C-c C-c g h% rails-nav:goto-helpers
100  * %(key)C-c C-c g c% rails-nav:goto-controllers
101  * %(key)C-c C-c g m% rails-nav:goto-models
102  * %(key)C-c C-c g o% rails-nav:goto-observers
103  * %(key)C-c C-c g p% rails-nav:goto-plugins
104  
105  === ERb refactoring
106  
107  * Create partial from selection %(key)C-c p%
108  * Create helper from block  %(key)C-c b%
109  
110  = Bugs
111  
112  emacs-rails designed for current CVS version of Emacs (future Emacs22)
113  more probably some functions will not work in older version, or will
114  work with errors, so if it is possible, try to update. I will not tell
115  you why you should use CVS version, just take my word.
116  
117  In some version from CVS some time ago, when you use emacs-rails,
118  sintax highlight in rhtml was not working, so just update to the
119  newest version from CVS.
120  
121  If you find error, place it description in "BugTrack":bugtrack.
122  
123  = Links
124  
125  * "Emacs W32 (CVS version for Windows)":http://ourcomments.org/Emacs/EmacsW32.html
126  * "HowToUseEmacsWithRails":http://wiki.rubyonrails.org/rails/pages/HowToUseEmacsWithRails
127  * "http://scott.elitists.net/users/scott/posts/rails-on-emacs":http://scott.elitists.net/users/scott/posts/rails-on-emacs
128  * "http://www.emacswiki.org/cgi-bin/wiki/RubyMode":http://www.emacswiki.org/cgi-bin/wiki/RubyMode
129  * "Emacs screencast":screencast
130  * "Effective Emacs":effectiveemacs
131  
132  [bugtrack]http://rubyforge.org/tracker/?atid=5809&group_id=1484&func=browse
133  [effectiveemacs]http://steve.yegge.googlepages.com/effective-emacs
134  [screencast]http://emacsonrails.drozdov.net/
135  [lisp]http://en.wikipedia.org/wiki/Lisp_programming_language
136  [frecursive]http://www.webweavertech.com/ovidiu/emacs/find-recursive.txt
137  [keyhh]http://www.keyworks.net/keyhh.htm
138  [snippets]http://www.kazmier.com/computer/snippet.el
139  [emacs]http://www.gnu.org/software/emacs/
140  [ror]http://rubyonrails.org
141  [emacs-rails]http://rubyforge.org/projects/emacs-rails
142  [inf-ruby]http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/misc/inf-ruby.el?view=co