开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜