相关疑难解决方法(0)

Emacs C++ - 模式不正确的缩进?

我正在使用c ++模式运行emacs 23并且存在一些缩进问题.假设我有这个代码:

void foo()
{
   if (cond)
     { <---
        int i;
        ...
     } <---
}
Run Code Online (Sandbox Code Playgroud)

这似乎是自动缩进的默认行为.但是我想改变它所以它会是这样的:

void foo()
{
   if (cond)
   {
      int i;
      ...
   }
}
Run Code Online (Sandbox Code Playgroud)

有没有办法通过配置c ++模式或我的.emacs文件轻松完成此操作?

c++ emacs indentation

35
推荐指数
3
解决办法
3万
查看次数

标签 统计

c++ ×1

emacs ×1

indentation ×1