Re: [code] [textadept] view questions

From: Benjamin Kober <>
Date: Mon, 17 Jun 2013 12:28:28 +0200

Am 17.06.2013 11:09, schrieb Chris Emerson:
> Hi,
> On Mon, Jun 17, 2013 at 10:28:31AM +0200, Benjamin Kober wrote:
>> 1. How to close the currently focused view? If I use view.unsplit a view
>> beneath the current view is closed and I don't know which one exactly.
> I've implemented an approximation of that for my vi emulation; see the
> (incorrectly named) function close_siblings_of() here:
> Essentially you can look through the view tree (_G._VIEWS) until you find
> your view's parent, then unsplit the other side. It's not perfect,
> especially if the other side is further split.
Thank you! That's great. Since you told me about your module I've taken
some of your functions but this one I didn't recognize.

> How do you mean? As far as i can tell, you can keep splitting as long as
> there's space.
As you said above one problem with unsplitting comes up if the other
side is a further split. While it is possible to nest splits as deep as
you want it seems as if one single view can only hold two other
(optional splitted) views or himself. With more views as child of the
same view the problem would disappear.
>> 3. Is it possible to move to the view on the right|left|above|under the
>> current focused view (and/or the current cursor position)?
> I think this should be possible as well by looking through _G._VIEWS and
> taking into account the "vertical" field.
That's a good idea. I think I'll try to modify your function to do that.

Greetings, Benjamin

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Mon 17 Jun 2013 - 06:28:28 EDT

This archive was generated by hypermail 2.2.0 : Mon 17 Jun 2013 - 06:51:52 EDT