做完后:设置wrap,Vim将线条长于窗口。
但是,是否可以将Vim包装到空白处的新行,而不是一半字?
帮助包装
This option changes how text is displayed. It doesn’t change the text
in the buffer,see ‘textwidth’ for that.
When on,lines longer than the width of the window will wrap and
displaying continues on the next line. When off lines will not wrap
and only part of long lines will be displayed. When the cursor is
moved to a part that is not shown,the screen will scroll
horizontally.
The line will be broken in the middle of a word if necessary. See
‘linebreak’ to get the break at a word boundary.
帮助换行
If on Vim will wrap long lines at a character in ‘breakat’ rather
than at the last character that fits on the screen.
帮助打破
‘breakat’ ‘brk’
string
(default" ^I!@*-+;:,./?"
)
所以,设置linebreak,它应该开箱即用。或者你可以限制breakat只是打破空格,而不是空格标点符号。