Emacs Ibuffer Summary

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.