#include<iostream>
using namespace std;
class Example
{
public:
Example(int a,int b,int c):m_a(a),m_b(b),m_c(c)
{ // Wrong indentation here due to the colon in above line, { should be under E
printf("\nThe 3 argument constructor invoked\n");
} // Wrong indentation again
private:
int m_a;
int m_b;
int m_c;
};
大家好,
我在C++的构造函数初始化列表中gvim的缩进有一点问题。 我在 .gvimrc 中使用 cindent,即使多次更改 .gvimrc 后我也无法解决这个问题。
有哪位好心人能给我一些设置方法吗?我试过更改 cinoptions 和 cinwords,但没有任何帮助。
我已经在上面提供的代码片段中突出显示了缩进问题。
感谢您的耐心等待
问候 拉里
最佳答案
:set cino=i0
关于c++ - C++ 构造函数初始化列表中的 vim 缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2288678/