Commit 7fa872925e4a33ffa9b5ab8d1e83f76487d634f0

updated README
README
(0 / 147)
  
1It is minor mode for editing "Ruby On Rails":ror code with
2"Emacs":emacs. This minor mode makes your work much easier and user
3friendly
4
5
6== Installation
7
8You need download last release from RubyForge page
9"http://rubyforge.org/projects/emacs-rails" and and unpack
10it to directory containing libraries of Emacs, by default it's
11$HOME/.emacs.d/
12
13Using Git:
14
15 cd $HOME/.emacs.d/
16 git clone git://github.com/tomtt/emacs-rails.git
17
18Using SVN:
19
20 cd $HOME/.emacs.d/
21 svn co svn://rubyforge/var/svn/emacs-rails/trunk emacs-rails
22
23Download and install required libraries
24
25* "http://www.kazmier.com/computer/snippet.el":snippets
26* "http://www.webweavertech.com/ovidiu/emacs/find-recursive.txt":frecursive
27
28*Alert:* From 0.44 release emacs-rails will require the
29 "inf-ruby":inf-ruby.
30
31After that you must add this code in $HOME/.emacs
32
33 (setq load-path (cons "~/.emacs.d/emacs-rails" load-path))
34 (require 'rails)
35
36For Windows users: you can use your help in CHM format (the default
37*ri*). This will require utility "KeyHH":keyhh. And add to a file
38.emacs
39
40 (setq rails-chm-file "full_path_to_rails_chm_manual")
41
42After that you can run Emacs. Almost all available actions are in the
43menu [Ruby On Rails]. The snippets are in the menu [Ruby On
44Rails-Snippets], for the convenience, they are divided into
45categories.
46
47To change default setting, select [Ruby On Rails - Customize].
48
49== First Acquaintance
50
51Go to directory with your rails application and open any file in Emacs:
52
53 cd $HOME/project/simple_rails_application
54 emacs app/controllers/application.rb
55
56There must be "RoR" sign in the list of active minor-modes in status
57bar. Thi means, that emacs-rails is enabled and ready to help you in
58your not so easy work.
59
60Almoust all actions are in the "RubyOnRails" menu. You can check it
61out and try some of them. Don't forget, that menu will help you only
62first time. After that you better use hot keys for effective work, you
63can find them in the brackets.
64
65== Features
66
67* TextMate-like snippets
68* Display of colored log files
69* Integration with script/generate and script/destroy (controller,
70 model, scaffold, migration, etc)
71* Integration with script/console and script/breakpointer
72* Run rake %(key)C-c C-c r%
73* Quick start svn-status in RAILS_ROOT %(key)f9%
74* Documentation search using *ri* or *chm* file and Rails API
75 reference in HTML %(key)f1%
76* Quick access to the main configuration files
77* Automatic TAGS generation in RAILS_ROOT directory
78
79=== Management of WEBrick/Mongrel
80
81* Your can select Webrick, Mongrel or Lighttpd
82* Start/stop application server %(key)C-c C-c w s%
83* Automatic browsing on current action (from view or controller)
84 %(key)C-c C-c w a%
85
86=== Navigation in RAILS_ROOT hierarchy
87
88* Quick switch stylesheets, javascripts, migrations, layouts, helpers,
89 controllers, models, observers, plugins
90* In controller file: go to views, functional test, helper
91 %(key)C-down%
92* Switch between action/view %(key)Ñ-up%
93* Go to file in current line (example: cursor at line [redirect_to
94 controller => :home, :action => "show"], will be open action "show"
95 in "home" controller) %(key)C-RET%
96* Quick access to the main configuration files using menu
97
98Other hot keys
99
100* %(key)C-c C-c g g% rails-nav:goto-migrate
101* %(key)C-c C-c g j% rails-nav:goto-javascripts
102* %(key)C-c C-c g s% rails-nav:goto-stylesheets
103* %(key)C-c C-c g l% rails-nav:goto-layouts
104* %(key)C-c C-c g h% rails-nav:goto-helpers
105* %(key)C-c C-c g c% rails-nav:goto-controllers
106* %(key)C-c C-c g m% rails-nav:goto-models
107* %(key)C-c C-c g o% rails-nav:goto-observers
108* %(key)C-c C-c g p% rails-nav:goto-plugins
109
110=== ERb refactoring
111
112* Create partial from selection %(key)C-c p%
113* Create helper from block %(key)C-c b%
114
115= Bugs
116
117emacs-rails designed for current CVS version of Emacs (future Emacs22)
118more probably some functions will not work in older version, or will
119work with errors, so if it is possible, try to update. I will not tell
120you why you should use CVS version, just take my word.
121
122In some version from CVS some time ago, when you use emacs-rails,
123sintax highlight in rhtml was not working, so just update to the
124newest version from CVS.
125
126If you find error, place it description in "BugTrack":bugtrack.
127
128= Links
129
130* "Emacs W32 (CVS version for Windows)":http://ourcomments.org/Emacs/EmacsW32.html
131* "HowToUseEmacsWithRails":http://wiki.rubyonrails.org/rails/pages/HowToUseEmacsWithRails
132* "http://scott.elitists.net/users/scott/posts/rails-on-emacs":http://scott.elitists.net/users/scott/posts/rails-on-emacs
133* "http://www.emacswiki.org/cgi-bin/wiki/RubyMode":http://www.emacswiki.org/cgi-bin/wiki/RubyMode
134* "Emacs screencast":screencast
135* "Effective Emacs":effectiveemacs
136
137[bugtrack]http://rubyforge.org/tracker/?atid=5809&group_id=1484&func=browse
138[effectiveemacs]http://steve.yegge.googlepages.com/effective-emacs
139[screencast]http://emacsonrails.drozdov.net/
140[lisp]http://en.wikipedia.org/wiki/Lisp_programming_language
141[frecursive]http://www.webweavertech.com/ovidiu/emacs/find-recursive.txt
142[keyhh]http://www.keyworks.net/keyhh.htm
143[snippets]http://www.kazmier.com/computer/snippet.el
144[emacs]http://www.gnu.org/software/emacs/
145[ror]http://rubyonrails.org
146[emacs-rails]http://rubyforge.org/projects/emacs-rails
147[inf-ruby]http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/misc/inf-ruby.el?view=co
  
1It is minor mode for editing "Ruby On Rails":http://rubyonrails.org/ code with "Emacs":http://www.gnu.org/software/emacs/.
2
3
4h2. Features
5
6* Navigation
7 Go from unit test to model to controller to functional test to view to spec etc.
8* Running tests and specs
9 Run test or spec for the current model, controller, lib etc.
10* Console and webserver
11 Run this console and webserver in a buffer.
12* Snippets
13 Use snippets to speedup code writing and editing.
14
15Try @C-h b@ to find out what key bindings are available and see @M-x customize-group <RET> rails@ for all the knobs and switches.
16
17
18h2. Installation
19
20
21h3. Dependencies
22
23Before you install this package make sure the following dependencies met:
24
25* Ruby Mode
26* Inferior Ruby Mode
27
28All of these are installable via the "ELPA":http://tromey.com/elpa/.
29
30Ruby mode doesn't know about typical Ruby DSL files so you'll need to give Emacs a hand:
31
32<pre><code> (add-to-list 'auto-mode-alist '("\\.builder$" . ruby-mode))
33 (add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
34 (add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
35 (add-to-list 'auto-mode-alist '("Capfile$" . ruby-mode))
36</code></pre>
37
38
39h3. Rails-minor-mode
40
41Pull the latest version from github:
42
43<pre><code> git clone git://github.com/remvee/emacs-rails.git ~/.emacs.d/rails-minor-mode
44</code></pre>
45
46Hook it up in your @.emacs@ or @.emacs.d/init.el@ with something like:
47
48<pre><code> (add-to-list 'load-path (expand-file-name "~/.emacs.d/rails-minor-mode"))
49 (require 'rails)
50</code></pre>
51
52You're ready to go.
53
54
55h3. Extra's
56
57You can find HAML and SASS support via ELPA.
58
59
60h4. RHTML-mode
61
62The latest from github:
63
64<pre><code> git clone git://github.com/eschulte/rhtml.git ~/.emacs.d/rhtml-minor-mode
65</code></pre>
66
67Hook it up:
68
69<pre><code> (add-to-list 'load-path (expand-file-name "~/.emacs.d/rhtml-minor-mode"))
70 (require 'rhtml-mode)
71</code></pre>
72
73
74h4. YAML-mode
75
76Latest from subversion repo:
77
78<pre><code> svn co http://svn.clouder.jp/repos/public/yaml-mode/trunk/ ~/.emacs.d/yaml-mode
79</code></pre>
80
81Hook it up:
82
83<pre><code> (add-to-list 'load-path (expand-file-name "~/.emacs.d/yaml-mode"))
84 (require 'yaml-mode)
85</code></pre>
86
87
88h2. Bugs
89
90Yes! Plenty! And most of them known, ignored and yearning for your attention! Please fork this repository and fix the stuff that bothers you.
91
92
93h2. Credits
94
95A big thanks to Dmitry Galinsky for starting this project. Since then a lot of people touched it too, checkout the commit logs.