加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

Vim:`set formatoptions`丢了?

发布时间:2020-12-15 19:22:42 所属栏目:安全 来源:网络整理
导读:我已经在我的vimrc中设置了formatoptions = cqn,但是由于某种原因,它不会被阻止。似乎Vim在某个时候恢复为默认值(fo = tcq)…但是我不知道为什么。运行-V100 / tmp / log只是给了我: formatoptions=tcq Last set from ~/.vimrc 没有有用的上下文。 那么,
我已经在我的vimrc中设置了formatoptions = cqn,但是由于某种原因,它不会被阻止。似乎Vim在某个时候恢复为默认值(fo = tcq)…但是我不知道为什么。运行-V100 / tmp / log只是给了我:
formatoptions=tcq
  Last set from ~/.vimrc

没有有用的上下文。

那么,有没有办法使格式化选项坚持?还是只需要在每次加载新文件时创建一个autocmd来重置它?

编辑

使用:verbose set formatoptions显示:

formatoptions=tcq
  Last set from ~/.vimrc

但是,在?/ .vimrc中,fo或formatoptions的唯一参考是设置formatoptions = cqn。

根据关于formatoptions的vim文档:

NOTE: This option is set to the Vi
default value when ‘compatible’ is
set and to the Vim default value when
‘compatible’ is reset.

所以如果兼容性的价值在改变,那可能会导致你所看到的问题。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读