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.
--
It appears that after his death, Albert Einstein found himself working
as the doorkeeper at the Pearly Gates. One slow day, he found that he
had time to chat with the new entrants. To the first one he asked,
"What's your IQ?" The new arrival replied, "190". They discussed
Einstein's theory of relativity for hours. When the second new arrival
came, Einstein once again inquired as to the newcomer's IQ. The answer
this time came "120". To which Einstein replied, "Tell me, how did the
Cubs do this year?" and they proceeded to talk for half an hour or so.
To the final arrival, Einstein once again posed the question, "What's
your IQ?". Upon receiving the answer "70", Einstein smiled and asked,
"Got a minute to tell me about VMS 4.0?"
--
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