vile
[Top][All Lists]
Advanced

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

Re: [vile] Limitations of :g commands


From: Paul Fox
Subject: Re: [vile] Limitations of :g commands
Date: Wed, 10 May 2006 09:45:34 -0400

decklin wrote:
 > Today (okay, so I only installed vile yesterday) I found myself needing
 > to do something with every other line in a file.  In vi, the rhs of :g
 > is just an ex command, so this can be done in a not-very-pretty way by
 > specifiying a relative range, like
 > 
 > :g/^/+d

i don't believe this (or anything like it) is possible.  but perhaps
someone else has an idea.  i confess that i often rely on external
filters when i hit things like this, i.e. 
    1G
    !Gsed '....'

but that's cheating.  :-)

 > to delete every other line.  According to the help file (and poking
 > around), however, my choices here are somewhat limited, and +d does not
 > work.  Is there a better way to do this that also works in vile?  Or
 > some other way to communicate a range to the command?  If not, how crazy
 > would this be to implement?
 > 
 > Sorry if this has been asked before; all I could find were the new
 > list's archives.

i don't recall this coming up before.

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




reply via email to

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