1

这个“bug”可能从一开始就潜伏着ruby-mode,但我最近在遇到新的 Rails 标准时注意到了它。例如,如果我要构建一个简单的助手 a-la Michael Hartl 的 Rails 教程:

def logo(name = nil)
  l = image_tag(path, alt: 'Sample App', class: 'round')
                # indentation moves cursor here

正如你所看到的,缩进被搞砸了,它不像以前那样遵循 2-spaces 约定。请注意,如果我将这些更改为“常规”哈希约定,它就像一个魅力。

def logo(name = nil)
  l = image_tag(path, :alt => 'Sample App', :class => 'round')
  # indentation is now here

这在 MuMaMo 缓冲区中确实令人沮丧,因为我可以获得很好的嵌套 HTML 代码。我的光标最终出现在页面末尾的第 2342 列中。我以为是 Rinari / nXHTML 问题,但不是。我正在简单地写这个助手ruby-mode,我得到了同样的行为。

有任何想法吗?

4

1 回答 1

2

这似乎固定在 ruby​​ HEAD

于 2012-02-04T12:13:01.820 回答