+ -
当前位置:首页 → 问答吧 → 怎么在vim里设置一行有80个字符呢

怎么在vim里设置一行有80个字符呢

时间:2011-10-28

来源:互联网

怎么在vim里设置一行有80个字符呢,谢谢

作者: dedlous   发布时间: 2011-10-28

引用楼主 dedlous 的回复:
怎么在vim里设置一行有80个字符呢,谢谢

:set tw=80

更多信息请查看:help tw
Python code
'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.  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.

作者: linwhwylb   发布时间: 2011-10-28

引用 1 楼 linwhwylb 的回复:
引用楼主 dedlous 的回复:
怎么在vim里设置一行有80个字符呢,谢谢

:set tw=80

更多信息请查看:help tw

Python code
'textwidth' 'tw' number (default 0)
local to buffer
……
我在~下新建了一个.vimrc set前要加:么?  
我只加了一句set tw=80可以么

作者: dedlous   发布时间: 2011-10-28