[英]Emacs 24 ruby-mode indentation behavior when using iterator such as `each`
my_array.each do
# code here
end
I think the best practice should be: 我认为最好的做法应该是:
my_array.each do
# code here
end
Should add something to my Emacs config file? 应该在我的Emacs配置文件中添加一些内容吗?
Seems to me you're using emacs-snapshot
. 在我看来你正在使用emacs-snapshot
。 By default it uses a new indentation engine that's a bit buggy right now. 默认情况下,它使用一个新的缩进引擎,现在有点儿错误。 To revert to the old one evaluate the following Emacs Lisp code: 要恢复旧版本,请评估以下Emacs Lisp代码:
(setq ruby-use-smie nil)
And restart ruby-mode
afterwards. 然后重启ruby-mode
。 I'll report the bug upstream. 我将向上游报告该错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.