代码之家  ›  专栏  ›  技术社区  ›  edbond

像Vim Emacs Ruby缩进

  •  9
  • edbond  · 技术社区  · 15 年前

    SVN中的Ruby模式,看起来等于1.1版本

    这是哈希的Emacs缩进

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

    维姆也是这样

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

    如何使Emacs在Ruby模式下像Vim一样缩进?

    1 回复  |  直到 15 年前
        1
  •  16
  •   Nicholas Riley    15 年前

    尝试 M-X自定义模式 ;您将看到自定义Ruby缩进的选项。看起来您可能想将“ruby deep indent paren”更改为nil。