vim缩进在C ++构造函数初始化列表中 [英] vim indentation in C++ constructor initialization list
本文介绍了vim缩进在C ++构造函数初始化列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#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;
};
您好,
在gvim的缩进在C ++的构造函数初始化列表中的小问题。
我在.gvimrc中使用cindent,即使在更改了我的.gvimrc之后,我也无法解决这个问题。
I have a little problem in gvim's indentation in the constructor initialization list in C++. I am using cindent in the .gvimrc and i am unable to solve this problem even after changing my .gvimrc a number of times.
一些仁慈的灵魂给我一些方法来设置。我已经尝试改变cinoptions和cinwords,但没有什么真正帮助。
Can some benevolent soul give me some method to set this up. I have tried changing cinoptions as well as cinwords but nothing really helped.
我突出显示了上面提供的代码片段中的缩进问题。
I have highlighted the indentation problem in the code snippet provided above.
感谢您的耐心等待。
尊重
lali
Regards lali
推荐答案
:set cino=i0
这篇关于vim缩进在C ++构造函数初始化列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文