On 9/6/06, Druce, Richard <[EMAIL PROTECTED]> wrote:
I'm trying to select all the text matching a (multi-line) pattern so I can put it into a separate document. I thought the global command would work but it only copies the first matching line, does anyone know a command to do this?
:g/multi-line-pattern/normal v//e"Ay This accumulates multi-lines containing multiline patterns into register A. Explanation: v//e turn current pattern into visual selection "Ay append visual selection to register A For best results, make pattern match up to and including the trailing \n of the last line of the mathing line (append .*\n if needed). Otherwise, last substring of the previous match will merge with first substring of next match in "A. Yakov
