How to ensure that formatoptions *never* contains `r` or `o`?

后端 未结 2 1043
不知归路
不知归路 2021-01-24 16:02

In vim, the filetype occasionally is set to a value that auto-populates formatoptions with r and o, two features that I do not like.

2条回答
  •  暖寄归人
    2021-01-24 16:49

    Modifying @sergio's answer slightly, you could use

    autocmd Filetype * set fo-=r fo-=o
    

    in your vimrc.

    This removes 'r' and 'o' from 'formatoptions' whenever the filetype is set.

    (Note that filetype detection has to be on, which can be set by :filetype on.)

提交回复
热议问题