当一条线不适合屏幕时,如何防止vim显示at符号(@)?

Cor*_*ein 23 vi vim settings

在vim中,当我有一条无法在屏幕上完全显示的行时,该行显示为符号"@"一直到屏幕底部.例如,如果我有这样的文件:

1 Hello World
2 Really long sentence 
  that doesn't fit on 
  one line.
Run Code Online (Sandbox Code Playgroud)

我在文档的开头,屏幕高度为3行,vim显示如下:

1 Hello World
@
@
Run Code Online (Sandbox Code Playgroud)

我宁愿让vim显示以下内容:

1 Hello World
2 Really long sentence
  that doesn't fit on
Run Code Online (Sandbox Code Playgroud)

这可能吗?

Ran*_*ris 31

加入set display+=lastline你的~/.vimrc

来自:help 'display':

lastline        When included, as much as possible of the last line
                in a window will be displayed.  When not included, a 
                last line that doesn't fit is replaced with "@" lines. 
Run Code Online (Sandbox Code Playgroud)


Jos*_*Lee 7

:set display=lastline 将使它看起来像这样:

2 Really long sentence
  that doesn't fit @@@
Run Code Online (Sandbox Code Playgroud)