如果我此刻在vim中写出如下代码
const SomeType & some_function (<ENTER>
然后 vim 将在两个制表符的缩进处继续下一行。我希望它仅用一个制表符缩进下一行。
最佳答案
:help cinoptions-values
(N When in unclosed parentheses, indent N characters from the line
with the unclosed parentheses. Add a 'shiftwidth' for every
unclosed parentheses. When N is 0 or the unclosed parentheses
is the first non-white character in its line, line up with the
next non-white character after the unclosed parentheses.
(default 'shiftwidth' * 2).
cino= cino=(0 >
if (c1 && (c2 || if (c1 && (c2 ||
c3)) c3))
foo; foo;
if (c1 && if (c1 &&
(c2 || c3)) (c2 || c3))
{ {
关于c++ - 我如何使用 vim cindent 实现这一点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7808939/