How to avoid comment indentation with vim cindent?

I have a block of comments, for example:

/*++ Blah: blah Foo: foo --*/ 

And I use the following vim cindent options:

 set shiftwidth=2 set tabstop=2 set cindent set cino=g0,+0,(0,W2 

If I select this comment block and backtrack it with = , vim will turn it into:

 /*++ Blah: blah Foo: foo --*/ 

Can I tell vim not to block comments?

+4
source share
1 answer

No, I do not think this is possible.

If comment indentation is important to me, I would consider switching the comment style (using mb:* to 'comments' ):

 /* * Blah: * blah * Foo: * foo */ 
+1
source

Source: https://habr.com/ru/post/1345111/


All Articles