An Emacs major mode displaying all user buffers (buffers without leading "*" and space) in a side window.
show-buffers
is similar to Emacs' built-in buffer-menu-mode
activated by command list-buffers
. The main difference is that show-buffers
displays only user buffers (buffers with a backed file) in a side window.
Unlike buffer-menu-mode
in which the buffer list is static, the content in show-buffers
window is updated dynamically when buffers are created or buffers are killed. Modified buffers are labeled with a "*".
Put the show-buffers.el in your emacs' load path and add (require 'show-buffers)
to your init.el
file.
Following variables can be customized:
show-buffers-window-width
: default to 35show-buffers-window-position
:'right
and'left
are available. Default to'right
show-buffers-refresh-interval
: how frequently (in seconds) shouldshow-buffers
window be refreshed. Default to 1.0 second.show-buffers-follow-interval
: how frequently (in seconds) shouldshow-buffers
window points to the buffer currently focused. Default to 0.8 seconds.
Several commands are available for buffer killing, saving and switching. However, these commands
are NOT intended to be used outside the show-buffers
side window. Instead, please use following keybindings in the side window (just like treemacs
).
r
: refresh the side windowk
: kill the buffer under the cursors
: save the buffer under the cursorS
: save all modified buffersRET
: display and switch to the buffer under the cursoro
: display and switch to the buffer under the cursor, then close all other windowsq
: close theshow-buffers
side window