-
Notifications
You must be signed in to change notification settings - Fork 76
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
Panes spawed with :split can break layout #41
Comments
I have added some code to the bottom of Here is the code I have added: " Get the number of the current window so we can come back here
let l:curwin=winnr()
" Cycle through all the windows, putting each one at the bottom
let l:i=1
while l:i <= winnr('$')
1wincmd w
wincmd J
let l:i += 1
endwhile
" Return to the window we started in
exec l:curwin . "wincmd w" It feels like a bit of a hack, but I don't see any better way to do it. If this is functionality you are interested in, I can generate a pull request. Edit: Just saw that @jdonaldson has already done this on his one commit to his fork and his approach is slightly cleaner. I have updated by code accordingly. |
The commit from @jdonaldson unfortunately breaks more situations than it fixes. So there's no fix to that for now... |
it seems it doesn't work now,the window didn't split,and if I split it manually it's not what it should be,and C-N is conflicted with something. |
@ellrywych What is not working? |
@spolu maybe I shouldn't post that reply in this thread. " Should I just put dwm.vim in plugin path and it will work? |
@ellrywych This does not belong to that stream at all indeed. You should split your windows with C-N if it does not work maybe it's because you already binded C-N... |
Thank you @spolu @captbaritone |
Hopefully, I'm just missing something here, but if I follow the following steps, I end up with three equal vertical splits rather than one focused split and the other two stacked on the right:
vim
:split
<C-Space>
:split
<C-Space>
If I then move to one of the three equal panes, and focus that pane, the correct layout is returned. It looks like it has something to do with splitting the focused pane and then focusing the new split. Similarly, if I split a non-focused pane and then focus, the correct layout is maintained.
I have tested this on MacVim, and Vim (7.3) on OSX and Ubuntu.
Edit: I've looked into this further, and it looks like this plugin makes no attempt to organize splits that are outside of it's expected layout. Would that be outside of the scope of this plugin, or a welcome improvement?
The text was updated successfully, but these errors were encountered: