如果*/不存在,VIM C/*评论*在新行上

JB0*_*2D1 2 c vim

很久以前,当我以前在VIM上编写C代码时,我已经启用了一些功能,这样当我开始发表评论/*并点击输入之前*/,VIM就会把*它放到一个很好的位置.那是什么,我该怎么回来?我想让它自动执行此操作:

/* some comments
 * <-- VIM put this " * " here */
Run Code Online (Sandbox Code Playgroud)

一般建议让VIM冷却器欢迎.

cni*_*tar 5

这是roformatoptions.看到:help fo-table

letter  meaning when present in 'formatoptions'

r       Automatically insert the current comment leader after hitting           
        <Enter> in Insert mode.                                                 
o       Automatically insert the current comment leader after hitting 'o' or    
        'O' in Normal mode.
Run Code Online (Sandbox Code Playgroud)