vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] searching and deleting


From: Paul Fox
Subject: Re: [vile] searching and deleting
Date: Thu, 23 Aug 2012 09:51:07 -0400

if you have lots and lots of this to do, i'd suggest
using a scriptable editor -- sed, perhaps.

if it's not too many, the search string in vile has history,
so you should be able to use up-arrow to get back to the 1321195617
you want to search for again.

does the file all look like you've quoted?  in that case instead
of doing the second search, you could delete the next paragraph
with
    d}
instead of your
    d/^\[

and finally, you know about the macro facility?  you could record
all of your keystrokes with ( ....do your first operation ... ^X),
and replay with ^X&.   search the help file for "Recorded macros"

paul

hymie! wrote:
 > 
 > Greetings.  I've run into an issue that I can't seem to figure out.
 > 
 > I have to edit a horrible file.  The file is formatted like this:
 > 
 > ==========
 > [Software\\Classes\\AppleSoftwareUpdateAdmin.ASUTaskSched.1\\CLSID] 
 > 1321195617
 > @="{BB46F03E-7CD2-489F-8F95-BB950F395FDB}"
 > 
 > [Software\\Classes\\AppleSoftwareUpdateAdmin.ASUTaskSchedul] 1321195617 
 > @="ASUTaskScheduler Class"
 > 
 > [Software\\Classes\\AppleSoftwareUpdateAdmin.ASUTaskSchedul\\CLSID] 
 > 1321195617
 > @="{BB46F03E-7CD2-489F-8F95-BB950F395FDB}"
 > ==========
 > 
 > So what I'm trying to do is
 > (*) search for 1321195617  ( /1321195617 )
 > (*) go to the beginning of the line ( 0 )
 > (*) delete the section ( d/^\[ )
 > (*) find the next instance of 1321195617 ( n )
 > 
 > Unfortunately, the "n" command is now using ^\[ as the "last search to
 > repeat" rather than my actual search.
 > 
 > Is there a way that I can accomplish this, where "n" will repeat the last
 > search I **meant** to do, not the last search I happened to type?
 > 
 > Thanks.
 > 
 > --hymie!    http://lactose.homelinux.net/~hymie    address@hidden
 > -------------------------------------------------------------------------------
 > 
 > _______________________________________________
 > vile mailing list
 > address@hidden
 > https://lists.nongnu.org/mailman/listinfo/vile

=---------------------
 paul fox, address@hidden (arlington, ma, where it's 69.1 degrees)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]