views:

31

answers:

1

I'm looking to disable (or customized) tab completion in emacs Ruby on Rails mode, specifically code completion. The fact that tab completion overrides using tab for indenting plus the fact that tab completion tries to complete lines like "end" is fairly infuriating.

Thanks

A: 

If you want to use tab for indentation, you might try

(add-hook 'ruby-mode-hook
          '(lambda ()
             (define-key ruby-mode-map [TAB]
               'indent-line)))

in your .emacs. Note that I tried it with ruby-mode and not with ruby-on-rails-mode. You probably will have to exchange 'ruby-mode-hook with 'ruby-on-rails-mode-hook.

Here are further instructions for keybindings in emacs.

http://xahlee.org/emacs/keyboard_shortcuts.html

http://emacsblog.org/2007/02/10/quick-tip-defining-mode-specific-key-bindings/

http://www.gnu.org/software/emacs/manual/html_node/emacs/Key-Bindings.html

And indentation information.

http://www.xemacs.org/Links/tutorials_1.html

phimuemue