MESSAGE
DATE | 2007-02-10 |
FROM | Ruben Safir
|
SUBJECT | Re: [NYLXS - HANGOUT] VIM Substitions and \n
|
From owner-hangout-at-mrbrklyn.com Sat Feb 10 14:42:52 2007 Received: from www2.mrbrklyn.com (localhost [127.0.0.1]) by www2.mrbrklyn.com (8.13.1/8.13.1/SuSE Linux 0.7) with ESMTP id l1AJgoIh004396 for ; Sat, 10 Feb 2007 14:42:52 -0500 Received: (from majordomo-at-localhost) by www2.mrbrklyn.com (8.13.1/8.13.1/Submit) id l1AJgnso004395 for hangout-outgoings; Sat, 10 Feb 2007 14:42:49 -0500 X-Authentication-Warning: www2.mrbrklyn.com: majordomo set sender to owner-hangout-at-nylxs.com using -f Received: from www2.mrbrklyn.com (localhost [127.0.0.1]) by www2.mrbrklyn.com (8.13.1/8.13.1/SuSE Linux 0.7) with ESMTP id l1AJgkOB004391; Sat, 10 Feb 2007 14:42:48 -0500 Received: (from ruben-at-localhost) by www2.mrbrklyn.com (8.13.1/8.13.1/Submit) id l1AJgkYA004390; Sat, 10 Feb 2007 14:42:46 -0500 Date: Sat, 10 Feb 2007 14:42:46 -0500 From: Ruben Safir To: Ruben Safir Cc: hangout-at-mrbrklyn.com Subject: Re: [NYLXS - HANGOUT] VIM Substitions and \n Message-ID: <20070210194246.GA4383-at-www2.mrbrklyn.com> References: <20070210173605.GA3627-at-www2.mrbrklyn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070210173605.GA3627-at-www2.mrbrklyn.com> User-Agent: Mutt/1.5.6i Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk X-Keywords: X-UID: 29930 Status: RO Content-Length: 2619 Lines: 70
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."
|
|