On 22/04/09 12:10, Tim Chase wrote:
>
> Kiffin Gish wrote:
>> What's the quickest way to remove all the trailing ^M characters in my
>> file?
>
> Though I think this is one of the FAQs, it's faster to just reply:
>
> :%s/\r
>
> than to dig up a link to the FAQ :)
>
> -tim
This would remove the first carriage return on any line, not necessarily
trailing ones. To remove only trailing ones by using a ":" command, use
:%s/\r$//
(I write the ending slashes explicitly for clarity, and to allow a
comment on the same line.)
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
18. Your wife drapes a blond wig over your monitor to remind you of what she
looks like.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---