Tuesday, November 30, 2010

Re: filter txt file based on start and ending marks

On 11/30/2010 04:01 PM, bboyjkang wrote:
> line that contains "interesting", for a total of 3 lines, or perhaps
> the entire paragraph that contains "interesting". Then, "start" is
> automatically put at the top of the paragraph/line(s), and "end" is
> put at the bottom of the paragraph/line(s).

Oh, I missed the paragraph bits...if they're blank-line separated
paragraphs, you can use the range '{,'} as in

g/interesting/sil! '{,'}s/^/XXX

You can read about those marks at

:help '{
:help '}

-tim

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: