Wednesday, May 21, 2014

Re: How drag (not resize) an entire split window?

On 21/05/14 20:31, Greg wrote:
> Say I have three (or more) horizontal split windows -- top window T, middle M, and bottom window B. I would like to slide up (or down) entire window M. (Sliding up will shrink T and grow B.) With gvim, I know that I can achieve this using the mouse by alternatively dragging up the two status bars that enclose M. But that's slow and clumsy. Is there a way using use the mouse to slides the entire window M with one drag? For example, somehow select entire window M and then drag it. Similarly, if I had four windows, I could select the two middle windows and drag them together.
>
> If window drag is not possible with the mouse, then I guess I'll want to have a function that drags a window by resizing it and the adjacent window. (Quicker to type a command than to (carefully) use the mouse to drag the two status bars by the same N lines.)
>

You can drag one statusbar or one vertical separator at a time to
enlarge the window(s) on one side of it while shrinking the window(s) on
the other size. There's no way you can move two statusbars or vertical
separators together by dragging them with the mouse unless the window(s)
between them is (are) of minimum size (see :help 'winminheight') in
which case you can "push" these windows together.

You can move a whole split-window to some other place relative to other
windows (e.g. move it to the top, or switch it with the window on one
side of it, etc.) by using the keyboard, see :help CTRL-W

You can blow up the current window to make it as large as Vim will let
it be by means of the Ctrl-W _ command in Normal mode, see :help CTRL-W__

"Rolodex Vim": With the following command in your vimrc, you can make
Vim always open the current window to full height and shrink the windows
above and below it to only a statusbar, like the index tabs for other
cards above and below the current card in a Rolodex:
:set noequalalways winminheight=0 winheight=9999

Conversely, to always make all windows as close as possible to equal
height, use
:set equalalways
and to make them equal now, Ctrl-W = (in Normal mode) or
:wincmd =
in Command-line mode or in a script. If 'winheight' is not at its
default value of 1 you may need to reset it with :set wh&


Best regards,
Tony.
--
Confucious say:
man who sleep in road wake up with run-down feeling.

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