Using the set eol
option Vim automatically adds a newline to the end of the file when it's saved. I have this option on but I would like to be able to see this newline in Vim, so I know that it's actually there.
For example with a file in Vim:
And the same file in TextMate:
This always tricks me and I end up adding a second new line and end up realizing later. This exact same question was posted here but the answer that was accepted didn't answer this portion of the question.
Using set list
:
I can see there is a $
character denoting a new line after the last line but this also litters the rest of the file with these. I know I could set up a toggle for this but I'd really prefer the TextMate like behavior.
~
) means no new line. Isn't that enough? - Billy Chan$
very confusing so I would not bother with that:) See if other guys has good answer for you. - Billy Chan~
) does not mean no new line. If there is a newline at the end of the last line, it would still show a tilde on the next line. (As in the first picture) - Nathan Hinchey