[Israel.pm] OT: how can you limit your search to a block in vi or emacs?
Shlomi Fish
shlomif at iglu.org.il
Sun Sep 7 22:39:21 PDT 2008
On Monday 08 September 2008, Oron Peled wrote:
> 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.
>
I guess it doesn't work. What does work is my range-search.vim vim plug-in. I
uploaded it to www.vim.org, but the search there is FUBAR and so I cannot
find it there.
However, it is available here:
http://www.shlomifish.org/Files/files/code/vim/range-search.vim
Regards,
Shlomi Fish
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
"The Human Hacking Field Guide" - http://xrl.us/bjn8q
Shlomi, so what are you working on? Working on a new wiki about unit testing
fortunes in freecell? -- Ran Eilam
More information about the Perl
mailing list