Buffer Sets
Prev | Chapter 3. jEdit Basics | Next

## Buffer Sets

The buffer sets feature helps keep the buffer lists local and manageable when using jEdit in a multiple-View and multiple-EditPane environment.

As mentioned in the previous section, each EditPane can show a Buffer Switcher, which displays the contents of a BufferSet. In jEdit 4.2, all EditPane buffer switchers showed the same BufferSet: a global list of all buffers that were opened from any EditPane in any View. When using many Views and EditPanes, this resulted in large lists of buffers, and made the next/previous buffer actions useless with many Views, EditPanes and Buffers.

In jEdit 4.3, it is possible to have more narrow scopes for the BufferSets of an EditPane. This makes the 'next-buffer' and 'previous-buffer' actions switch between buffers that are local to the view or pane.

The three BufferSet scopes are:

1. Global: Includes all buffers open from any EditPane.

2. View: EditPanes in the same View share the same BufferSet. Opening a buffer in one View will not affect the other views.

3. EditPane: Each EditPane can have its own independent BufferSet.

The Buffer Set scope can be Global, View, or EditPane, and can be changed from many places. The default can be set from Utilities>Global Options > View > BufferSet scope for new EditPanes.

A new BufferSet can be created in a number of ways, such as when a new View is created (and the default BufferSet scope is not global) or when the View is split (and the default BufferSet scope is EditPane), or when the BufferSet scope is changed to EditPane via the statusbar or menu action.

New BufferSets are initially empty, or populated with the current buffer only, or a copy of the existing BufferSet. This behavior can be changed from Global Options > View > New (View/EditPane) BufferSets contain: copies of current BufferSet/Current Buffer/Untitled Buffer .

File > Close behavior has changed in 4.3pre15: now it will remove the current buffer from the EditPane's BufferSet only. If it was the last BufferSet to contain that buffer, the buffer is also closed.

The File > Close (global) action closes the buffer in all EditPanes, as the regular File > Close action did before.

When Exclusive Buffersets are enabled, any time a buffer is opened from one EditPane, it should be automatically closed in other EditPanes which use a disjoint (non-intersecting) BufferSet.

Clear BufferSet except active will clear the BufferSet of the current EditPane by performing a Close on all items except those buffers which are displayed in another active EditPane.

### Switching Bufferset Scopes

The statusbar shows you which BufferSet scope is active (look for the letter "G", "E" or "V"). Double-clicking on that will allow you to change the scope. Currently, it changes your scope for the current editpane, but this behavior will someday change and cause a global scope-change on all editapnes immediately.

The scope for BufferSets can also be changed from View>Buffer Sets > (Global|View|EditPane) Buffer Set.

Prev | Up | Next
Switching Buffers | Home | Window Docking