Friday, August 15, 2014

Re: window split size of a visual selection

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

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