添加换行符后的vim缩进

时间:2017-02-17 22:04:43

标签: vim

我正在寻找"& DEBUG_OP,"并添加换行符

Before:

DEBUG_LOG(debug & DEBUG_OP,"entry is not found in %x", arg)

After:
DEBUG_LOG(debug & DEBUG_OP,
"entry is not found in %x", arg)

Expected:
 DEBUG_LOG(debug & DEBUG_OP,
            "entry is not found in %x", arg)

如何在添加换行符后缩进代码?缩进所需的空间取决于代码中DEBUG_LOG行的位置。这是C代码。

1 个答案:

答案 0 :(得分:1)

我按ESC和==在这种情况下触发自动缩进。