thanks Tony.
however I think I need a way to just "not display" instead of modifying
the file -- it might need to be shared with other people working in
other OS..
thanks anyway.
FYI attached is a file of mine with ^M displayed on beginning&ending of
each line.
a :%/\r//g will clear all ^M and make it looks clean...but I'm not sure
how it will display in windows..
regards
ping
On 06/12/2012 08:14 PM, Tony Mechelynck wrote:
On 13/06/12 00:30, ping wrote:
I happen to have a file displaying ^M, but looks this works only to hide
the ^M in the end of the line , not the beginning of it.
My file have both...see following screenshot:
after :e ++ff=dos the trailing ^M disappear, but the preceding one is
still there, see screenshot below:
is there a way to also not display that?
thanks.
regards
^M anywhere other that at end-of-line (in a file from other than Mac
OS9 or earlier) is not part of an end-of-line marker.
It is sometimes used when displaying a progress bar, to move the
cursor back to the left margin without advancing the «typewriter
paper» so that the line just displayed can be overwritten.
You might try the following:
1) :e ++ff=dos
should erase any end-of-line ^M. Only one if there are several
together.
2) :%s/.*\r//e
should erase the last ^M (if there is one) on any line, plus
everything preceding it on the same line. No change to lines without a
^M. No error if no lines at all with a ^M.
Best regards,
Tony.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
PHLAPA-VFTTP-137#
PHLAPA-VFTTP-137#
PHLAPA-VFTTP-137#term len 0
PHLAPA-VFTTP-137#term width 200
PHLAPA-VFTTP-137#show clock
THU JUN 07 2012 03:40:49 UTC
PHLAPA-VFTTP-137#
PHLAPA-VFTTP-137#
PHLAPA-VFTTP-137#
PHLAPA-VFTTP-137#show clock
THU JUN 07 2012 03:40:50 UTC
PHLAPA-VFTTP-137#term wid 200
PHLAPA-VFTTP-137#term len 0