很久以前,当我以前在VIM上编写C代码时,我已经启用了一些功能,这样当我开始发表评论/*并点击输入之前*/,VIM就会把*它放到一个很好的位置.那是什么,我该怎么回来?我想让它自动执行此操作:
/* some comments
* <-- VIM put this " * " here */
Run Code Online (Sandbox Code Playgroud)
一般建议让VIM冷却器欢迎.
这是r和o在formatoptions.看到:help fo-table
Run Code Online (Sandbox Code Playgroud)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.