gpt4 book ai didi

c - VIM C/* 注释 * 如果 */不存在则换行

转载 作者:行者123 更新时间:2023-12-02 21:36:43 24 4
gpt4 key购买 nike

很久以前,当我在另一台机器上在 VIM 中编写 C 代码时,我启用了某些功能,以便当我使用 /* 开始注释并在 * 之前按 Enter 键时输入/ 后,VIM 会放置一个 * 并将其很好地隔开。那是什么以及如何取回它?我希望它自动执行此操作:

/* some comments
* <-- VIM put this " * " here */

让 VIM 更受欢迎的一般建议。

最佳答案

它是formatoptions 中的ro。请参阅: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.

关于c - VIM C/* 注释 * 如果 */不存在则换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21212079/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com