> Hi Davido!
>
> On So, 19 Sep 2010, Davido wrote:
>
> > Hello,
> >
> > Suppose you edit a conf file, and want just the :
> >
> > var = val
> >
> > lines, without the comments. It would be great if the NarrowRegion
> > plugin could handle this case.
> >
> > More generally, I was wondering if it would be possible to run a filter in
> > vim and send the result to NR. In other words, I would like to to this :
> >
> > :g/pattern/NR
> >
> > to edit the matching lines in a new buffer.  Unfortunetly, the above
> > command give me just the first matching line. Is there a workaround to
> > this ?
>
> That is an interesting question. Unfortunately, this is not how the
> Narrow Region plugin works. It basically only remembers for each each
> region the start and end regions in the original buffer. So it requires
> one continuous region.
>
> But you want one region, that possibly consists of lines that are not
> continous in the original buffer. Now what should happen, if you insert
> line breaks and you write the buffer back. Where does the new line
> belong to?

Well, a possible solution would imply an elaborate layout in the narrowed
buffer, with markers between the continuous sections of the original
buffer to avoid any ambiguity in creation/deletion/move of lines (using
vim folding or whatever).

> I have to think about it how to implemented this.
>
> regards,
> Christian

Thanks for your interest in my problem, anyway.

--
Regards,

Davido

-- 
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

Reply via email to