[wplug] Converting Line Terminations

jsbillings at mac.com jsbillings at mac.com
Thu Feb 7 14:14:40 EST 2002


vim should have support for it.  When I open a file with the DOS
newlines, I get this at the base of my vi editing window:

"scratch" [dos] 5L, 19C

I've had times when this has bit me, because I didn't notice it was a
dos file, and a user had downloaded a shell script from some web page,
and it had the \rs in it.  Since the first line was *really* 
#!/bin/sh\r
it wouldn't run, it couldn't find the executable (because there is no
file /bin/sh\r)


On Thu, 2002-02-07 at 14:02, J Aaron Farr wrote:
> Thanks for all the suggestions thus far.  I guess I'm kinda surprised that 
> vi (vim) or emacs doesn't have some sort of option to repress display of 
> WinNT style line terminations (those are carriage returns right?) and just 
> maintain the format when saving (ie - take them out on opening the file and 
> then replacing them when saving or something like that).  Or perhaps I'm 
> just not familiar enough with either application.
> 
> If I remember right there's a way to specify the format something is saved 
> in (at least in emacs I think) in terms of end of line markers.  But that's 
> just for new files I think, not for files opened that already have some 
> alternative line termination scheme.  I suppose the nice thing is if that 
> feature isn't available and it's something that I do decide I want enough, I 
> can always just code it myself.  Isn't open source / free software 
> wonderful?
> 
> -jaaron
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug




More information about the wplug mailing list