Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split within current vsplit #64

Open
elzibubble opened this issue Aug 6, 2018 · 2 comments
Open

Split within current vsplit #64

elzibubble opened this issue Aug 6, 2018 · 2 comments

Comments

@elzibubble
Copy link

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.

@chrisbra
Copy link
Owner

chrisbra commented Aug 8, 2018

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:

If you don't like that your narrowed window opens above the current window,
define the g:nrrw_topbot_leftright variable to your taste, e.g. >
let g:nrrw_topbot_leftright = 'botright'
<
Now, all narrowed windows will appear below the original window. If not
specified, the narrowed window will appear above/left of the original window.
(default: topleft)

@elzibubble
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants