In the use of Emacs, a lot of buffer is opened, including non-file buffer, such as shell buffer,
Email buffer, so how do you manage these bigger and larger buffer?
The default C-x c-b will perform list-buffers for your search use,
However, Emacs also offers a more powerful alternative.
Ibuffer, you will certainly like this substitute, then do a key binding it:
(Global-set-key (kbd "C-x c-b") ' Ibuffer)
Placed in your. Emacs, C-x C-e execute this sentence to
So now the effect of C-x C-b is:
Let's say you want to filter the C code, type/m and enter C-mode to see the effect, the prefix "/" in
Ibuffer is a group filter command.
As you can see, only the C language file buffer is left, but if you want two kinds of major mode:c-mode and
Org-mode, then you can use/G to group the buffer, as long as after filtering, type/g and type the group name,
Can be grouped, then you can type//go back to the full list, then go to the next group, through the above operation, establish
The Orgfiles and cfiles groups are as follows:
You can view buffer by E (edit), F (Find), or RET, use m to mark buffer, you can type D, delete
: Mark 15 buffer at a time, and then type D, you will be prompted to kill the buffer, if you mistakenly mark the buffer, you can also use U undo.
The following table lists the filter commands:
| Key | Bindings |
|-----+-----------------------------------|
| /m | Set a filter based on major mode |
| /n | Set a filter condition based on the buffer name |
| /C | Set a filter condition based on the content of buffer |
| /F | Set a filter condition based on filename |
| /> | Set a filter based on buffer size |
| /< | Also based on buffer size |
| / / | Remove all filters in effect |
The following table lists the group filter commands:
| Key | Bindings |
|-----+----------------------|
| /g | Create groups based on filter results |
| TAB | Move to Next Group |
| M-p | Move to Previous Group |
| / \ | Delete all existing groupings |
The following table lists the sort commands:
| Key | Bindings |
|-----+----------------------|
| , | Looping by sort Mode |
| S I | Reverse Current Sort |
| S A | Sort by Alphabet |
| S F | Sort by file name |
| S V | Sort by last View date |
| S S | Sort by Buffer Size |
| S M | Sorted by Major Mode |
Emacs Ibuffer Summary