简体   繁体   English

喜欢-vim emacs ruby​​缩进

[英]like-vim emacs ruby indentation

ruby-mode from svn, looks equal to 1.1 version 来自svn的ruby-mode,看起来等于1.1版本

here is emacs indentation of hash 这里是emacs的哈希缩进

User.all({
       :joins => :account,
       :conditions => {:delete_at => nil}
     })

here is the same in vim 这在vim中是一样的

User.all({
  :joins => :account,
  :conditions => {:delete_at => nil}
})

How to make emacs indent like vim in ruby-mode? 如何在ruby模式下使emac像vim一样缩进?

Try Mx customize-mode ; 试试Mx自定义模式 ; you'll see options for customizing Ruby indentation. 你会看到自定义Ruby缩进的选项。 Looks like you may want to change "Ruby Deep Indent Paren" to nil. 看起来你可能想要将“Ruby Deep Indent Paren”更改为nil。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM