Friday, October 26, 2012

Re: Tmux-style window resizing in vim?

Am 26.10.2012 12:58, schrieb Jonathan del Strother:
> I'm a big fan of tmux's window management - it seems a lot more
> intuitive than vim's, which has never quite clicked with me and I'm
> not sure why.
>
> Tmux resizes as if you were pushing/pulling at the border of the
> current window in the direction that you're trying to resize, via the
> hjkl keys. So if I have two windows stacked on top of each other, and
> the top pane has focus, hitting <C-b>j pushes the split downwards,
> growing the top window & shrinking the bottom. If the bottom pane had
> focus, <C-b>j would pull the split downwards, resulting in the same
> effect.
> By contrast, in vim, <C-w>+ increases the height of the current
> window. Which I can see the logic of, but the key locations (+/- vs
> </> for the vertical/horizontal resizing) frustrate me, and if you
> just remap it to hjkl then it feels like it ought to be using the same
> resize behaviour as tmux.
>
> Other niceties from tmux are that you can press <C-b>jjjjj to carry on
> resizing, whereas in vim you'd have to use
> <C-w>+<C-w>+<C-w>+<C-w>+<C-w>+. I'd also love to have something like
> <C-b>spacebar which cycles through a series of preset layouts
> (vertical split with a small sidebar, equal horizontal split, etc
> etc).
>
>
> Are there any plugins that tackle something like this? Or any
> suggestions on learning to cope?
>
> Thanks
> -Jonathan

You can have sub-modes if you want.

How to change window size with <C-W>+++-->>< :
https://groups.google.com/group/vim_use/browse_thread/thread/ac98f1e67faff909#a1fcfb4c997bdd75

--
Andy

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

No comments: