David Vallner <david / vallner.net> writes:

> George Ogata wrote:
>
>>I got used to using C-j instead of RETs and TABs.  Give it a bash.
>>  
>>
> Eugh, my pinky finger hurts enough from coding on a German keyboard from 
> reaching to AltGr all the time, reaching for Ctrl for each newline would 
> definately give me CTS ;P You can always hack ruby-mode.el and map 
> RUBY-REINDENT-NEWLINE-AND-INDENT (word order subject to change) to RET - 
> I managed even as an utter elisp newbie. Works like a charm.

Heh.  I'm surprised you'd put up with emacs at all if the control-key
proliferosity bothered you that much.  I C-[fbpnaejod...] so often it
feels quite natural.

But you don't need to hack ruby-mode.el; just hook it in:

(add-hook 'ruby-mode-hook
  (lambda ()
    (define-key ruby-mode-map [return]
      'ruby-reindent-then-newline-and-indent)))