[Israel.pm] OT: how can you limit your search to a block in vi or emacs?

Oron Peled oron at actcom.co.il
Sun Sep 7 21:59:05 PDT 2008


On Monday, 8 בSeptember 2008, Shlomi Fish wrote:
> On Sunday 07 September 2008, Oron Peled wrote:
> > If you mark the start/end of your range with arbitrary letters
> > (using the 'm' operator -- e.g: 'ma' and 'mb')
> >
> > than you may refer these marks as well with the apostrophe:
> >   :'a,'bs/from mark a/to mark b included/
> 
> You can also do:
> 
> :'a,'b /regex

Just tested it and it doesn't work. It simply places the cursor
after the line marked b. I tested both as you wrote (space before
the /) and without (as normally ':' commands should not have a space
between the address and command) -- both cases present the same
behavior. Also the n[ext] command keep searching for the regex
without any bounds.

If you can *verify* your trick to work, please send the details
of your setup. Especially, the output of :set command.

Bye,

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
oron at actcom.co.il                  http://www.actcom.co.il/~oron
"In fact, one of the saddest but most common conditions in elementary
school computer labs ..., is the children are being trained to use
Word, Excel and PowerPoint. I consider that criminal, because children
should be making things, communicating, exploring, sharing, not
running office automation tools."   -- Nicholas Negroponte



More information about the Perl mailing list