NrrwRgn icon indicating copy to clipboard operation
NrrwRgn copied to clipboard

Split within current vsplit

Open elzibubble opened this issue 7 years ago • 2 comments

This could be an awful black morass but... I usually edit with 2-3 vsplits open:

|a|b|c

The narrowed region opens above all these:

narrow
|a|b|c

which isn't very 'narrow'! I'd prefer:

|a|  b   |c
| |narrow|c

IE for my current vsplit to be hsplit. Hope that's clear!

I tried :belowright and :botright but neither seemed to do anything.

elzibubble avatar Aug 06 '18 13:08 elzibubble

Yeah, custom commands did not respect the command modifiers like :belowright until recently. I'll see if I can implement this easily (at least for newer vims). However in the meantime, have a look here:

https://github.com/chrisbra/NrrwRgn/blob/9a87f0c567c8dbc569154ed3c80e3b0a8972ecbd/doc/NarrowRegion.txt#L337-L345

chrisbra avatar Aug 08 '18 05:08 chrisbra

That'd be ace, thanks! I'm using Neovim btw.

The setting is helpful but it doesn't help with part of my usecase that I forgot to mention: it'd be really good if the cursor returned to the split it was in when you narrowed, or at least the one it was in previously. Currently if I narrow from 'b' then close the narrow, I end up in 'a'.

elzibubble avatar Aug 08 '18 08:08 elzibubble