Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 828
Cory Klein Avatar asked Jan 07 '11 01:01

Cory Klein


People also ask

How to hide line numbers vim?

Make the vi/vim text editor show or hide line numbers Press ESC key. At the : prompt type the following command to run on line numbers: set number. To turn off line numbering, type the following command at the : prompt set nonumber.

How do I skip a line in vim?

If we are in the vim editor, then simply do this, “Press the ENTER key, write the Line number, and press Shift+ g”: Again the output is the same.


2 Answers

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.  
like image 112
Randy Morris Avatar answered Sep 21 '22 05:09

Randy Morris


:set display=lastline will make it look like this:

2 Really long sentence   that doesn't fit @@@ 
like image 32
Josh Lee Avatar answered Sep 19 '22 05:09

Josh Lee