[英]Vim: Getting gq Not to Displace `**' in Comment Block
Suppose I have a nice comment block, such as the one below 假设我有一个很好的评论块,如下面的那个
/*
** This is a nice comment block. Displace the `**'s and I will eat your nose! Also, here is a long line of text clearly longer than the textwidth, which should force gq to rearrange the lines. Wheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
**
**
*/
and that I apply gq
to format it and ensure that no line exceeds the character count. 并且我应用
gq
进行格式化,并确保没有任何一行超出字符数。 How can I get gq
not to displace the initial `**'s that prepend each comment line? 我怎样才能让
gq
取代每个评论行前面的初始`**?
Thank you very much! 非常感谢你!
See :help format-comments
. 请参阅
:help format-comments
。 I get the result you want from 我得到你想要的结果
:set comments=s0:/*,mb:**,ex:*/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.