Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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