Wednesday, August 10, 2011

ruby mode : use describe-mode within emacs

Here is a rather brief description, at least covering the very special keyboard shortcuts.
What a pity, that I haven't been able to find it online so far.

But here it is:


Ruby mode:
Major mode for editing Ruby scripts.
TAB properly indents subexpressions of multi-line
class, module, def, if, while, for, do, and case statements, taking
nesting into account.

The variable ruby-indent-level controls the amount of indentation.
key             binding
---             -------

C-c Prefix Command
TAB ruby-indent-line
C-j reindent-then-newline-and-indent
RET newline
ESC Prefix Command
{ ruby-electric-brace
} ruby-electric-brace

C-c , Prefix Command

C-M-a ruby-beginning-of-defun ;; actually …-of-class
C-M-e ruby-end-of-defun

C-M-f ruby-forward-sexp
C-M-b ruby-backward-sexp

C-M-h backward-kill-word

C-M-p ruby-beginning-of-block

C-M-n ruby-end-of-block


C-M-q ruby-indent-exp

C-c , a rspec-verify-all
C-c , t rspec-toggle-spec-and-target
C-c , v rspec-verify


No comments: