我如何让Vim不打破DocBlock评论? [英] How can I get Vim to not break DocBlock comments?
本文介绍了我如何让Vim不打破DocBlock评论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
/**
* Example Comment
*/
当我按 When I press enter after 您将要修改后输入注释 Vim自动缩进,但光标与
)Vim选项,如下所示: *
字符。我如何让Vim添加 *
和一个空格,使我的注释与 E
?
Comment
Vim autoindents but leaves the cursor lined up with the *
characters. How can I get Vim to add the *
and a space so that my comment lines up with the E
?推荐答案
formatoptions
code> fo
You will want to modify the value of the formatoptions
(short name fo
) Vim option, like this:
:set fo+=or
r
选项启用插入模式;在正常情况下使用 o 或 O 时, o
请尝试Vim的内置帮助以了解详细信息:
The r
option enables the behavior in insert mode; o
enables it when using o or O in normal to switch into insert. Try Vim's builtin help for details:
:help formatoptions
这篇关于我如何让Vim不打破DocBlock评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文