Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以设置ruby-mode为自动取消缩进结尾?
ruby-mode
例如,在 end 输入如下:
def foo # indented end
它应该变成这样:
您可以通过添加以下内容来修改您的 .emacs 以启用 ruby 电动模式:
(require 'ruby-electric) (add-hook 'ruby-mode-hook (lambda () (ruby-electric-mode t)))
每当您键入 class 或 def 时,这将添加一个正确缩进的结尾。