How to avoid indenting comment blocks with vim cindent?
I have a comment block such as:
/*++
Blah:
blah
Foo:
foo
--*/
And I'm using the following vim cindent options:
set shiftwidth=2
set tabstop=2
set cindent
set cino=g0,+0,(0,W2
If I select that comment block and indent it with =
,开发者_Go百科 vim turns it into:
/*++
Blah:
blah
Foo:
foo
--*/
Can I tell vim cindent not to indent comment blocks?
No, I don't think that's possible.
If indent of comments is important to you, I would consider switching the comment style (with mb:*
in 'comments'
) to this:
/*
* Blah:
* blah
* Foo:
* foo
*/
精彩评论