2011-01-07 30 views
17

在vim中,當我有一行不能完全顯示在屏幕上時,該行顯示爲符號「@」直至屏幕底部。舉例來說,如果我有一個文件,例如:當線條不適合屏幕時,如何防止vim在符號(@)處顯示?

1 Hello World 
2 Really long sentence 
    that doesn't fit on 
    one line. 

而且我在文檔的開始,用3線屏幕高度,VIM顯示以下內容:

1 Hello World 
@ 
@ 

我會寧願vim顯示以下內容:

1 Hello World 
2 Really long sentence 
    that doesn't fit on 

這可能嗎?

回答

24

添加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. 
6

:set display=lastline將使它看起來像這樣:

2 Really long sentence 
    that doesn't fit @@@