Saturday 28 November 2015

emacs ibuffer

ibuffer

In ~/.emacs.d/init.el:

;; replace `list-buffers` with `ibuffer`
(global-set-key (kbd "C-x C-b") 'ibuffer)

Open ibuffer by C-x C-b

Create filters:

/m: filter by a major mode
/n: filter by buffer name.
/c: filter by buffer content.
/f: filter by filename
/>: filter by buffer size
/<: filter by buffer size
//: remove all filters in effect

Filtered groups:

/g: create a filter group from filters
TAB: move to next filter group
M-p: move to previous filter group
/\: remove all active filter groups
/S: save the current groups with a name
/R: restore previously saved groups
/X: delete previously saved groups

Every time you open a file which matches a filter it will appear under the group

o on a file will open that file and switch focus to it
C-o on a file will open that file and leave focus in ibuffer
C-x o switches focus to the other window

No comments:

Post a Comment