SwitchBuffer Lee Turner
lee@leeturner.org

Introduction

The SwitchBuffer plugin is a must for any programmer who hates to take his/her hands off the keyboard, while wanting to switch buffers. This plugin is similar to the iswitchb library in emacs. The underlying theme behind each, is that you can type part of a buffer name and only those buffers whose names contain the string you have typed, are shown in the buffer list. You can then hit enter to switch to the first buffer in that list.

Usage

Nothing much to it. You open the SwitchBuffer dialog by selecting the 'Show Switch Buffer' menu item from the SwitchBuffer menu. The dialog will list all the buffers that you have currently have open. The textbox at the top of the dialog (which is given focus automatically) is there to type the name of the buffer that you want to switch to. The list of buffers below is correspondingly updated to feature only those buffers whose names contain what you have typed. The first buffer in the list is always selected. Hit Enter or click on the buffer name with the left mouse button to switch to that buffer. Use the up/down arrow keys or the shortcuts alt+i / alt+k to select the previous and next buffers respectively. Buffers can also be closed directly from within the SwitchBuffer dialog by pressing ctrl+w or by clicking on the buffer name with the right mouse button.

SwitchBuffer also provides another way of switching buffers. This is called a 'File Suffix Switch'. As the name suggests, this options allows you to switch buffers based on the suffix (the extension) of the buffer name. If you select this option from the SwitchBuffer menu, SwitchBuffer with take the name of the currently active buffer and attempt to find any other open buffers with the same first part of the file name (the part before the dot '.') but with different extensions (e.g index.html and index.js). If only one other buffer is found, SwitchBuffer will switch to that buffer automatically, if more than one is found, the SwitchBuffer dialog is displayed to allow you to choose the buffer that you want.

SwitchBuffer works really well if you assign either of the above options to a shortcut in the jEdit 'Global Options' so that you can operate it from the keyboard.

If configured to do so (see below), SwitchBuffer also remembers your previous buffer and displays that buffer name in the text field, so you can simply switch to the previous buffer that you were in by hitting Enter. This is configurable to allow SwitchBuffer to only remember the previous buffer if switched using SwitchBuffer, or to allow it to remember the previous buffer you were using no matter how it was accessed (by using jEdit's buffer switcher for example). The SwitchBuffer dialog also remembers the size and position that the user previously set for it.

Options

General options:

Filename matching options:

There are a number of filename matching options available. These are as follows:

File list options:

Previously open buffers:

License

The source code is distributed under the GPL. Please have a look at: http://www.fsf.org/copyleft/gpl.html

Feedback

The preferred way to send bug reports is to use the Sourceforge Plugin Bug Tracker.

You can also write to: