开发者

Is it possible to set a width to a vim document so newlines are inserted automatically?

开发者 https://www.devze.com 2023-04-12 10:21 出处:网络
I want some text I am typing in vim to开发者_Python百科 automatically break into a new line after so many characters have been typed, rather than letting me type out lines of infinite length.Is this p

I want some text I am typing in vim to开发者_Python百科 automatically break into a new line after so many characters have been typed, rather than letting me type out lines of infinite length. Is this possible?


The textwidth option does that.

:set tw=78

As the help points out, you may want to check the option called formatoptions or fo for short. This will provide you more control over formatting aspects. The table of options is also helpful (help under fo-table tag).

0

精彩评论

暂无评论...
验证码 换一张
取 消