I'm looking to disable (or customized) tab completion in emacs Ruby on Rails mode, specifically code completion. The fact that tab completion over开发者_StackOverflow中文版rides using tab for indenting plus the fact that tab completion tries to complete lines like "end" is fairly infuriating.
Thanks
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.
Link
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
精彩评论