On Mon, 5 Oct 2009 13:14:00 -0700 (PDT)
Bill <[email protected]> wrote:

> 
> I have been using vim for a week but my searches have not yielded an
> answer for the following question regarding vim 7.2.245 on my xp box.
> 
> Vim inserts several blue tilde signs (~) on empty lines *below* my
> text. I don't know why it does this, but just ignored it. Then, while
> experimenting with various keystrokes there suddenly appeared several
> empty lines *above* my text with blue "at" signs (@). All I could say
> is wtf?
> 
> Is this something to do with the meaning of life, or is it more
> mundane like u haz empty linez around yur text?

More like the second :)

The tildes just mean to identify that there is nothing more to show,
not even empty lines. The first tilde shows where the file ends, so, if
you have, below your text, 3 empty lines, and then all tilde-lines, you
have three trailing newlines at the end of the file. I for one dislike
multiple newlines at the end of a file, and seek that the immediate
next line below my last text line is a tilde (Vim automatically inserts
a newline for you at the end of a file). 

The at sign says "there's more lines, but the next line would wrap and
take up more than what you currently can see". If you have 'wrap' on,
Vim never shows you a line unless it's complete. So, if you have a huge
line, it might need many physical lines to show it to you. If it
doesn't have that many, it shows an '@', telling you that the file
doesn't end (~), doesn't have a newline ( ), but can't really be
displayed properly with the current setup. Usually, placing the cursor,
or rather trying to place it, on the first '@' line will make the line
visible.

Vim veterans, I'm not sure about at least the secod part myself, so
please correct me if I'm wrong.

Vlad

Attachment: signature.asc
Description: PGP signature

Reply via email to