vim设置文本宽度

'textwidth' 'tw'        number  (default 0)
                        local to buffer
                        {not in Vi}
        Maximum width of text that is being inserted.  A longer line will be
        broken after white space to get this width.  A zero value disables
        this.
        'textwidth' is set to 0 when the 'paste' option is set and restored
        when 'paste' is reset.
        When 'textwidth' is zero, 'wrapmargin' may be used.  See also
        'formatoptions' and ins-textwidth.
        When 'formatexpr' is set it will be used to break the line.
        NOTE: This option is set to 0 when 'compatible' is set.

例子:
set textwidth=80

set tw=80

posted @ 2016-06-25 16:44  立体风  阅读(1592)  评论(0编辑  收藏  举报