Jim Freeze <jim / freeze.org> writes:

> You are right. I never noticed that vi put a newline in the
> file, even if I put only a single character in. Yuck, I thought
> vi wouldn't to that! In fact, it took some doing to get the
> single char in there:
>
> echo 'a' > t; ls -l t
> -rw-r--r--  1 jfreeze  sm  2 Nov 20 11:40 t
> printf 'a' > t; ls -l t
> -rw-r--r--  1 jfreeze  sm  1 Nov 20 11:41 t

This is because a lot of unix utilities expect a newline at the end of
a text file.  Well, I don't know if this is still the case, but it was
:)

I usually set require-final-newline to t in emacs because of this.  I
don't see an option in vi(m) for this however...

ttyl,

-- 
Josh Huber