Vim 隐藏太长无法完全显示的行

Vim hides lines that are too long to be displayed completely

在编辑一个我懒得换行的文档时,我注意到 Vim(准确地说是 MacVim 8.0),而不是只显示那部分行适合,完全隐藏 行太长而无法显示在当前屏幕上的文本。 space 将被适合的行部分占据,只是留空,就好像字符变得不可见一样。

有没有办法改变这种行为?

如果我对你的问题的理解正确,设置 :set display=lastline 会有所帮助。

    Change the way text is displayed.  This is comma separated list of
    flags:
    lastline        When included, as much as possible of the last line
                    in a window will be displayed.  "@@@" is put in the 
                    last columns of the last screen line to indicate the 
                    rest of the line is not displayed.
    truncate        Like "lastline", but "@@@" is displayed in the first
                    column of the last screen line.  Overrules "lastline".
    uhex            Show unprintable characters hexadecimal as <xx>
                    instead of using ^C and ~C. 

    When neither "lastline" nor "truncate" is included, a last line that
    doesn't fit is replaced with "@" lines.

您也可以尝试:set nowrap