Thanks for all the people replying to my question. Apparently, it is a
feature in vi which insert a newline for you whenever you open a new line in
the file but this newline feature does not happen in emacs. Here are some of
>From Dennis Martens,
I'll stick my neck out and say it can't be done. I have checked all of the
vi options that I know of, and cannot see one that will suppress a linefeed
at the end of each line. The only way I know of to do this, is to use
/usr/ucb/echo -n "text" >> file, which will write a line of text to the end
of a file without addind the newline character.
>From Jay Lessert,
I get only newline (octal 012) in my files. Use 'od -b' on your file
to confirm what characters you're actually getting. Are you claiming
you're getting newline *and* linefeed (octal 014, I think) in your
files? So a file containing only the letter "a" saved from vi is
showing three bytes long instead of two?
Yes, you are right. Even though I typed in "a", I get the "\n" (newline)
anyway even I did not hit return after "a".
> -----Original Message-----
> From: Law, Anthony
> Sent: Monday, May 29, 2000 4:21 PM
> To: email@example.com
> Subject: linefeed is put at end of each line in vi
> In vi, when you insert a line, the linefeed is put in for you
> automatically because you can see the linefeed by setting the "set list"
> in the vi session. How to turn this feature off? Thanks.
> Anthony Law
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:08 CDT