On 12/06/12 20:01, skeept wrote:
[...]
Thanks, the suggestion in the link
:e ++ff=dos
seems to do the trick. It does not overwrite the file and the ctrl-m are gone.
I don't understand well what it does, but it does the job,
Thank you again.
":e ++ff=dos" reads the file, accepting either CR+LF or LF only as an
end-of-file mark. It also sets the 'fileformat' do "dos" so that if and
when you save the file, all lines will have a CR+LF end-of-line, which
is standard for Windows.
With no ++ff= modifier, if 'fileformats' (plural) includes both "unix"
and "dos" (in any order), a file with mixed ends-of-lines, or a file
with DOS-style ends-of-line everywhere except that the last line lacks
any kind of end-of-line, will be treated as a Unix file: only LF will be
accepted as end-of-line, and any line which had a CR before the LF will
be displayed with a ^M at its end. In the case of a DOS file lacking an
end-of-line on the last line (a common case if the file comes from a
different editor on Windows), you'll see a ^M at the end of every line
except the last one.
Best regards,
Tony.
--
Build a better mousetrap, the saying goes -- and with the brassiere,
Yankee Ingenuity did exactly that. But their true stroke of genius was
the new bait. The old fashioned mousetrap was loaded with cheese;
nobody cares much about cheese, except mice. But when American
Know-How reloaded the brassiere with tits, every heterosexual male in
the country was hopelessly trapped.
-- Alan Sherman, "The Rape of the A*P*E*"
--
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