开发者

Disable emacs-rails mode tab completion

开发者 https://www.devze.com 2023-01-18 13:51 出处:网络
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 indenti

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号