Saturday, August 16, 2014

Re: window split size of a visual selection

On Fri, Aug 15, 2014 at 4:29 AM, Christian Brabandt <cblists@256bit.org> wrote:
> Hi Alexandre!
>
> (Please don't top poste)
>
> On Do, 14 Aug 2014, Alexandre Provencio wrote:
>
>> Ethan, after testing this great plugin I unfortunately found out it
>> still not exactly what I'm looking for.
>>
>> While NrrwRgn "focuses" on the selected area, what I really would need
>> is the case when I create a viewport of a selected area but work on the
>> *other* viewport, and it would be very helpful if I could create this
>> viewport exactly the size of a selection so I don't have to loose time
>> resizing it.
>
> That's whats hooks are for (:h NrrwRgn-hook)
>
> You probably want something along
> :let b:nrrw_aucmd_create='exe "resize".line("$")|wincmd p'
>
> You probably also want
> :let g:nrw_rgn_protect='n'
> to be able to modify the original buffer.
>
> Also please note, you need to make sure, that if you modify the
> highlighted regions, do NOT write the narrowed buffer or else it will
> overwrite your changes.
>
> Mit freundlichen Grüßen
> Christian

Christian, although I could not manage to auto resize the way you
suggested, I think I may not need it anymore. After realizing I could
open nested narrowed regions, I feel that the way the plugin deals with
it is smart enough for my workflow.

Thanks for your help and this very useful plugin.

Cheers.

- Alexandre

> --
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment