Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New lines spaces

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0

While in Vi how do you get it to show the ^M at the end of the line.

Is there a setting to turn this on or off???
 
Berger:

vi provides two ways of displaying non printing characters:

1) The lower case l # that's a lower case L, not 1

will list the non-printing characters. Examples:

:start_line, end_linel

:.l

appears to show the whole file

2) use the set list command

:set list

shows all the characters. Use

:set nolist

to turn it off.

Regards,

Ed
 
by adjusting your terminal emulator (client) or terminal type/setup on server side
 
The :set list command is the one I always use.

Just as a quick aside -- the ^M character should only show when you're editing a DOS (Windows file). UNIX files will show end-of-line with a $.

This is because DOS end-of-line is two characters, carraige-return and line-feed and UNIX end-of-line is just line-feed.
Mike
______________________________________________________________________
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
And if you need to get rid of 'em


:1,$s/^V^M//g

(you type Control V and then Control M- only the control M will show up) Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
I seem to remember a command that you could run to convert a DOS file to UX so that the EOL or EOF control characters wouldn't appear. In HPUX it is dos2ux.
 
SCO is xtod = UNIX -> DOS and dtox for DOS->UNIX ***************************************
Party on, dudes!
[cannon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top