Faster CR -> LF Macro?

AVKuznetsov kuzn at htsc.mephi.ru
Wed Mar 19 09:01:55 CET 2008


On Wed, 19 Mar 2008 01:44:58 -0500
Aaron Hsu <arcfide at mac.com> wrote:

> Hello All,
> 
> Do any of you have a faster way of doing a CR->LF conversion?
> 
> Right now I am using a macro. I want to be able to do this in one shot
> easily, because I do this a lot. Right now I have:
> 
> 	pos = search("\r", 0, "regex")
> 	while (pos >= 0) {
> 	  replace_range(pos, $search_end, "\n")
> 	  pos = search("\r", 0, "regex")
> 	}

The simplest (fastest?) way is save as Unix and open again.
Seems, this operation must do auto-conversion(?).

Alexey


More information about the Discuss mailing list