[CLUE-Tech] vi macro question

David Anselmi anselmi at intradenver.net
Wed May 2 19:08:31 MDT 2001


To make the below a macro, in command mode type:

:map <macro keys> d'<mark letter>

Then when you type (in command mode) <macro keys> you'll delete to the point
you've set mark.  But d'<mark> seems short enough not to require a macro.

Jonathan Mowers wrote:

> On Wed, 2 May 2001, Lynn Danielson wrote:
>
> > I'd like to have a vi macro that will delete all lines
> > from a previously marked line to the current line that
> > my cursor is on.  Does anyone here know how to do this?
>
>  Have you tried just hitting d`<mark>, setting the mark with the m key and
> then a letter.
>
> --
> Jonathan M. Mowers
> Earn money in your spare time -- blackmail your friends.
>
> _______________________________________________
> CLUE-Tech mailing list
> CLUE-Tech at clue.denver.co.us
> http://clue.denver.co.us/mailman/listinfo/clue-tech


Received: from hotmail.com (f157.law15.hotmail.com [64.4.23.157])
	by clue.denver.co.us (8.9.3/8.9.3) with ESMTP id MAA17315
	for <clue-tech at clue.denver.co.us>; Wed, 2 May 2001 12:18:23 -0600
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Wed, 2 May 2001 10:28:35 -0700
Received: from 194.129.155.28 by lw15fd.law15.hotmail.msn.com with HTTP;	Wed, 02 May 2001 17:28:34 GMT
X-Originating-IP: [194.129.155.28]
From: "Phil North" <p_d_north at hotmail.com>
To: clue-tech at clue.denver.co.us
Subject: Re: [CLUE-Tech] vi macro question
Date: Wed, 02 May 2001 11:28:34 -0600
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <F1571Np7vXee4fDGCl9000071ff at hotmail.com>
X-OriginalArrivalTime: 02 May 2001 17:28:35.0237 (UTC) FILETIME=[5100CD50:01C0D32D]
Sender: clue-tech-admin at clue.denver.co.us
Errors-To: clue-tech-admin at clue.denver.co.us
X-BeenThere: clue-tech at clue.denver.co.us
X-Mailman-Version: 2.0beta2
Precedence: bulk
Reply-To: clue-tech at clue.denver.co.us
List-Id: CLUE technical discussions, questions and answers. <clue-tech.clue.denver.co.us>

Lynn,

I don't know about macros in vi but here's how I do it.  Maybe it could be 
macroized.  If the previously line is marked (ma) and the current line is 
marked (mb), then from the vi command line do

:'a,'b d

and all lines from a to b (inclusive) are deleted.

Phil North
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com




More information about the clue-tech mailing list