如何配置emacs选项卡行为

如何配置emacs选项卡行为,emacs,tabs,ruby-mode,Emacs,Tabs,Ruby Mode,我在emacs tabbing上花了不少功夫,但还没有弄明白这一点 在ruby模式下: SomeClass.create( this_is: where_i_want_to_tab, because: that_is_how_we_do_it ) SomeClass.create( this_is: where_emacs_wants_to_put_it, but: my_pull_request_aint_gonna

我在emacs tabbing上花了不少功夫,但还没有弄明白这一点

在ruby模式下:

SomeClass.create(
  this_is: where_i_want_to_tab,
  because: that_is_how_we_do_it
)

SomeClass.create(
                 this_is: where_emacs_wants_to_put_it,
                 but: my_pull_request_aint_gonna_be_merged_like_this
)

这可能是ruby模式设计人员做出的一个代码风格决定,但是否可以对其进行配置

ruby模式的这种行为无法配置,但在Emacs 24.4(即将发布)中进行了更改。有这样的代码:

SomeClass.create(
                 this_is: where_emacs_wants_to_put_it,
                 but: my_pull_request_aint_gonna_be_merged_like_this
)
SomeClass.create(
  this_is: where_i_want_to_tab,
  because: that_is_how_we_do_it
)
将按如下方式缩进:

SomeClass.create(
                 this_is: where_emacs_wants_to_put_it,
                 but: my_pull_request_aint_gonna_be_merged_like_this
)
SomeClass.create(
  this_is: where_i_want_to_tab,
  because: that_is_how_we_do_it
)

这与现有的一致。

事实证明,您可以在24.3中对此进行配置:

(setq ruby-deep-indent-paren nil)

在ruby模式的选项卡上有两个相关的线程:@lawlist它们是相关的,但是是独立的问题。当前使用emacs的ruby开发者做什么?点击空格键?我主要使用升华文本,但我一直涉猎emacs。这是最后一个痛点。希望24.4即将发布:)@harumph@h他们可能已经在使用Emacs24.4预测试或EmacsTrunk了。它很容易安装在OSX和Ubuntu上,也有针对Windows的版本iirc。在OSX上,它通常是值得推荐的,因为它还包括相当数量的特定于OSX的改进。