[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sun-managers
Subject:    [SUMMARY] linefeed is put at end of each line in vi
From:       "Law, Anthony" <ALaw () neonsoft ! com>
Date:       2000-05-31 0:18:01
[Download RAW message or body]

Hi, 

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
the replies,

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?
Anthony:
Yes, you are right. Even though I typed in "a", I get the "\n" (newline)
anyway even I did not hit return after "a".

Thanks again.

Regards,
Anthony Law



>  -----Original Message-----
> From: 	Law, Anthony  
> Sent:	Monday, May 29, 2000 4:21 PM
> To:	sun-managers@sunmanagers.ececs.uc.edu
> Subject:	linefeed is put at end of each line in vi
> 
> Hi,
> 
> 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
> alaw@neonsoft.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic