Search code examples
vimsettingsvi

How do you prevent Vim from showing an at symbol (@) when a line doesn't fit on screen?


In Vim, when I have a line that can not be entirely shown on screen, the line appears as an at symbol "@" all the way down to the bottom of the screen. For example, if I have a file as such:

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

And I am at the beginning of the document, with a screen height of 3 lines, Vim shows the following:

1 Hello World
@
@

I would rather have Vim show the following:

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

Is this possible?


Solution

  • Add set display+=lastline to your ~/.vimrc

    From :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.