Is it possible to select text from the current position, forward a number of lines, or to (or even between) a specific line number(s)? Also, is there any means of selecting text from the current cursor position up until a search term is found? (ex, I'm on line 30, I search for 'foo', which happens to occur next on line 57, so lines 30-57 (or at least line 30 through 'foo' on line 57) are selected.
Appreciate any assistance that can be provided!
On 10 Jan 2010, at 06:52, jims311 wrote:
Is it possible to select text from the current position, forward a number of lines [...]
What you can do is use regular expressin searches like: .*$(.*$){5} to select to the end of current line and the next five lines. Similar can be used to select up to foo: (?m).*?foo
Alan - Thanks - the (?m).*?foo is working perfectly. (I'm in the process of trying to figure out how/why :-) I'm unable to get the .*$(.*$){5} example to work though - it selects from the current position to the end of the current line, but no further.
I'm doing both of these in the standard find dialog (cmd-F), with the 'Regular expression' option selected. I've tried variously w/ and w/o the 'Ignore case' and 'Wrap around' options checked.
Is there something else I should be doing on the .*$(.*$){5} example?