All is in the title.
If a have opened the three files:
The file dropdown contains:
file_a (/some/relatively/long/path/dir1)
file_a (/some/relatively/long/path/dir2)
file_b (/some/relatively/long/path/dir1)
And that bother me because I have to look on the right to differentiate the two file_a
, and on the left for the others. This happens a lot to me mostly because I code in python, and thus I often have several __init__.py
files opened.
How do I get jedit to display
/some/relatively/long/path/dir1/file_a
/some/relatively/long/path/dir1/file_b
/some/relatively/long/path/dir2/file_a
config:
Unfortunately this is not easily possible currently, I just had a look at the source and this is not configurable.
You can:
EBComponent
with the EditBus
that listens for new EditPane
s getting createdBufferSwitcher
from the EditPane
ListCellRenderer
from the BufferSwitcher
ListCellRenderer
to the BufferSwitcher
that first calls the retrieved ListCellRenderer
and then additionally sets the text to value.getPath()
Buffer List
plugin as to whether it maybe suits your needsNow follows code that implements the work-part of option two, runnable as BeanShell code which does this manipulation for the current edit pane. The third line is not necessary when done in an EBComponent, this is just that the on-the-fly manipulation is shown immediately.
r = editPane.getBufferSwitcher().getRenderer();
editPane.getBufferSwitcher().setRenderer(
new ListCellRenderer() {
public Component getListCellRendererComponent(list, value, index, isSelected, cellHasFocus) {
rc = r.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
rc.setText(value.getPath());
return rc;
}
});
editPane.repaint();