Hi,
On 3/2/07, Afton Lewis <[EMAIL PROTECTED]> wrote:
Hi foks.
How would I search for a regex within a particular area? The text
document is very long, and I don't want to match all instances, just
those I care about. I would probably select the text visually.
I use the following command:
command! -nargs=* -range=% RS exe 'normal /\%>' . (<line1> - 1) .
\ 'l\%<' . (<line2> + 1) . 'l<args><CR>'
With this command, you can search for a pattern within a specified
range of lines.
:1,10RS pattern
:'<,'>RS pattern
etc.
- Yegappan