Re: [code] Recently used Switch Buffer

From: Mitchell <m.att.foicica.com>
Date: Wed, 4 Mar 2015 14:48:20 -0500 (EST)

Hi Ryan,

On Wed, 4 Mar 2015, Ryan Pusztai wrote:

> Hi,
>
> I am not sure if this has been asked for before, but I would really like to
> change the order the default "switch buffer" dialog stores the files in. I
> think it is really helpful for quick jumping back and forth if the files
> would be stored in a recently used list.
>
> I am not sure where to start. Any ideas? Thanks.

One idea is to keep a list of buffer order, with most recent towards the
top.

* Start with a copy of _BUFFERS.
* Connect to `events.BUFFER_BEFORE_SWITCH` to move the buffer being
   switched from to the top of your list.
* Connect to `events.BUFFER_NEW` and `events.BUFFER_DELETED` to update
   your list appropriately as buffers come and go.
* Remap Ctrl+B (or whatever your buffer switcher binding is) to show a
   filteredlist with your table.

Cheers,
Mitchell

-- 
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 Wed 04 Mar 2015 - 14:48:20 EST

This archive was generated by hypermail 2.2.0 : Thu 05 Mar 2015 - 06:39:08 EST