[code] Re: [textadept] Feature requests: buffer/tab management

From: Joshua Krämer <joshua.kraemer.att.gmail.com>
Date: Mon, 11 Aug 2014 19:26:40 +0200

On 2014-08-10, 19:13, Mitchell wrote:

> On Sat, 9 Aug 2014, Joshua Krämer wrote:
> > I miss a feature to rearrange the order of open buffers (tabs).
>
> This is not trivial and would push Textadept over its C code limit of
> 2000 lines.

Oh, I find this surprising, as this feature can also be found in
small editors (like mousepad, for example). I thought it may be
possible to add a layer between the internal buffers and the UI where a
list with the UI buffer order is mapped to a list with the internal
buffer IDs. I didn't actually ask for a way to change the internal
buffer order, just the order of their representation in the UI.
However, I'm not knowledgeable about editor programming, so I may just
not see the obstacles involved.

> > I would also prefer Textadept to switch to the previously used
> > buffer when a buffer is closed.
>
> This is a good idea and has been on my TODO list for a while. I'll
> commit a change soon.

Great, thanks.

> > Additionally, it would be nice if there was a function available for
> > Ctrl-Tab buffer cycling that jumps to the last active buffer with a
> > single Ctrl-Tab press, and starts to cycle through all other buffers
> > with multiple Tab presses. This is also how Alt-Tab works in most
> > window managers, I think. It makes it easy to quickly switch back
> > and forth between two buffers.
>
> I've briefly looked into this before, but it's more tricky than it
> seems. Feel free to submit a patch, but I have no need for this and
> won't be working on it.

I have configured the following key bindings to switch to a given
buffer. This must suffice for now. I will consider a patch when I
have some time ...

function check_goto_buffer(n)
        if _BUFFERS[n] then view.goto_buffer(view, n, false) end
end
keys.c1 = {check_goto_buffer, 1}
keys.c2 = {check_goto_buffer, 2}
...

Kind regards,
Joshua

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 11 Aug 2014 - 13:26:40 EDT

This archive was generated by hypermail 2.2.0 : Tue 12 Aug 2014 - 06:26:31 EDT