Re: Semi-OT: Vi Question/Need

From: William Robertson <william_at_williamrobertson.net>
Date: Fri, 15 Mar 2013 19:36:58 +0000
Message-ID: <-2224070872718228375_at_unknownmsgid>



Can't test right now, but should be something like

:%s/\(.\{72\}\(..*$\)/\2

On 15 Mar 2013, at 19:08, "Christopher.Taylor2_at_parallon.net" <Christopher.Taylor2_at_parallon.net> wrote:

Except I wanted to do it in one command through the whole file using search/replace.

Basically, search for cursor postion X, then delete to end of line through each line of the file.

Shift-D requires me to position the cursor using the keys to the cursor position on each line and hit shift-d.

Chris

-----Original Message-----

From: Powell, Mark [mailto:mark.powell2_at_hp.com] Sent: Friday, March 15, 2013 1:48 PM
To: Taylor Christopher - Nashville; oracle-l_at_freelists.org Subject: RE: Semi-OT: Vi Question/Need

You mean <shift>d delete to end of line ?

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Christopher.Taylor2_at_parallon.net
Sent: Friday, March 15, 2013 9:36 AM
To: oracle-l_at_freelists.org
Subject: Semi-OT: Vi Question/Need

What is the simplest way to delete from a line POSITION to end of line through the whole file? The piece I can't figure out is to start the delete/strip portion at a specific line position on a line. Here's what I'm looking at:

At Id0 (line 4) I want to strip everything from position 73 (the 4th PIPE to end of line). I can't seem to find the right combo of search/replace.

(The reason for doing this is I can strip that off for 2 plans and then compare the plans using WinMerge to quickly id the diffs.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Mar 15 2013 - 20:36:58 CET

Original text of this message