【问题标题】:(Emacs) Brackets aren't indenting correctly(Emacs) 括号没有正确缩进
【发布时间】:2021-11-12 18:27:31
【问题描述】:

在 emacs 中,当我输入以下内容时:

if(true)
{

我明白了:

if(true)
  {

那么我必须按向左箭头向后移动一个空格,然后删除多余的两个空格才能得到预期的结果。有关如何解决此问题的任何想法?

【问题讨论】:

    标签: emacs indentation key-bindings


    【解决方案1】:

    检查RET 键在当前模式下绑定的内容。将其绑定到其他东西,例如newline

    或者只是关闭electric-indent-mode,把它放在你的初始化文件中:

    (electric-indent-mode -1)
    

    这会关闭 RETEnter 键)在大多数编程模式下自动缩进。

    【讨论】:

      猜你喜欢
      • 2016-05-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多