Operating System - Linux
1752633 Members
5890 Online
108788 Solutions
New Discussion юеВ

VI in RHEL 5.3 not showing Control-M's

 
ECUse
Advisor

VI in RHEL 5.3 not showing Control-M's

I had a issue with a file that had Contol-M's in the file, but I didn't know there was Control-M's since they were not visible. I am using RHEL 5.3 vi and vim. I am use to these being displayed by default on HPUX with vi.

Is there a way to make the Control-M's visible by default or option when you have the file open with vi?

Thanks
4 REPLIES 4
ECUse
Advisor

Re: VI in RHEL 5.3 not showing Control-M's

Finally figured it out...

:edit ++ff=unix

It has to do with the file format. Very annoying but at least I know how to do it now.
ECUse
Advisor

Re: VI in RHEL 5.3 not showing Control-M's

Hopefully this will be helpful for others because it caused me grief.
Dennis Handly
Acclaimed Contributor

Re: VI in RHEL 5.3 not showing Control-M's

When I use vim with windows/DOS formatted files, it mentions dos format on the status line and doesn't bother showing the control-Ms.
TwoProc
Honored Contributor

Re: VI in RHEL 5.3 not showing Control-M's

command at the bottom of the screen in vi:

:%s/$//

There you go, it's visible now.

I always want them gone - so I do the opposite:

:%s/$//
We are the people our parents warned us about --Jimmy Buffett