Wednesday, September 29, 2010

Window splitting corner case

Thanks to Michael Henry for pointing out :botright, thus introducing me
to the family of window-placement-overriding commands.

In the following scenario, is there an easy way to open a new window (E)
that occupies half of windows (A) and (B), preferably from within (B)?

(Rulers just indicating that the (A+B)|C boundary doesn't move)

Before: After:
11111111 11111111
12345678901234567 12345678901234567
| | | | | | |
┌───────┬───────┐ ┌───┬───┬───────┐
│ A │ C │ │ A │ E │ C │
│ │ │ │ │ │ │
├───────┤ │ ├───┤ │ │
│ B │ │ │ B │ │ │
│ │ │ │ │ │ │
├───────┴───────┤ ├───┴───┴───────┤
│ D │ │ D │
│ │ │ │
│ │ │ │
└───────────────┘ └───────────────┘

Not as though I have a good use case for this. Was just curious after
discovering this class of commands (and felt like practicing my
box-drawing).

--
Best,
Ben

Non-Unicode boxes, in case they're munged:

+-------+-------+ +---+---+-------+
| A | C | | A | E | C |
| | | | | | |
+-------+ | +---+ | |
| B | | | B | | |
| | | | | | |
+-------+-------+ +---+---+-------+
| D | | D |
| | | |
| | | |
+---------------+ +---------------+

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

Post a Comment