MESSAGE
DATE | 2007-02-10 |
FROM | Ruben Safir
|
SUBJECT | Re: [NYLXS - HANGOUT] VIM Substitions and \n
|
What is weirder is that when I run this program
#!/usr/bin/perl
use strict; my $string;
open FILEIN , '<', '/home/ruben/testing.txt' or die; open FILEOUT , '>', '/home/ruben/testing2.txt' or die;
my $tmp; for $tmp (){ print $tmp; $tmp =~ s/e/\n/g; print FILEOUT $tmp; }
Then vim seems to see the \n normally. But when you run the substition in VIM it goes nuts.
Ruben
On Sat, Feb 10, 2007 at 12:36:05PM -0500, Ruben Safir wrote: > It seems that the \n has disapeared from the VIM substituion commands. When you run > > 1,$s/\n/\n/g > > You get a single line with -at- chars spred through out it. Instead I needed to do something like > > 1,$s/$/ /g > > and her the EOL char seems to magically be placed on the end of lines in VIM. I've confirmed this with > the :help page. This would seem to be a huge break with programming conventions. How can VIM not recognize the > universal "\n" char which is in the ASCII set? > > Ruben > > -- > http://www.mrbrklyn.com - Interesting Stuff > http://www.nylxs.com - Leadership Development in Free Software > > So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 > > http://fairuse.nylxs.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 > > "Yeah - I write Free Software...so SUE ME" > > "The tremendous problem we face is that we are becoming sharecroppers to our own cultural heritage -- we need the ability to participate in our own society." > > "> I'm an engineer. I choose the best tool for the job, politics be damned.< > You must be a stupid engineer then, because politcs and technology have been attacted at the hip since the 1st dynasty in Ancient Egypt. I guess you missed that one."
-- http://www.mrbrklyn.com - Interesting Stuff http://www.nylxs.com - Leadership Development in Free Software
So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998
http://fairuse.nylxs.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
"Yeah - I write Free Software...so SUE ME"
"The tremendous problem we face is that we are becoming sharecroppers to our own cultural heritage -- we need the ability to participate in our own society."
"> I'm an engineer. I choose the best tool for the job, politics be damned.< You must be a stupid engineer then, because politcs and technology have been attacted at the hip since the 1st dynasty in Ancient Egypt. I guess you missed that one."
|
|