The fastest buffer-jumping Emacs lisp package around
frog-jump-bufferis the fastest buffer-jumping Emacs lisp package around. It is the spiritual successor to
ace-jump-bufferand is powered by
frog-menu. Just like
ace-jump-buffer, it allows you to hop to any Emacs buffer in 2-3 key strokes.
You can install it from MELPA with
M-x package-installor here’s a basic
(use-package frog-jump-buffer :ensure t)
This is the main entry-point. Bind it to your preferred key-binding.
It opens the
frog-menubuffer selector. The buffers appear in order of most recent display or selection.
avycharacter next to a buffer switches to that buffer.
0to toggle between opening in the same window or
6will cycle through the default buffer filters:
1: show all buffers in the
2: filter buffers to the same mode as
3: filter buffers to only buffers represented by files
4: show buffers from
recentf, which can include killed buffers
5: filter buffers to the same project as
projectiileto be installed)
6: filter buffers to similarly named buffers. (i.e. if
*magit: frog*, etc.)
This is a list of regexps of buffer names to ignore or buffer-matching filter functions to use. If you want to cut down on the noise of unimportant buffers, you will want to configure this. Here’s an example:
(dolist (regexp '("TAGS" "^\\*Compile-log" "-debug\\*$" "^\\:" "errors\\*$" "^\\*Backtrace" "-ls\\*$" "stderr\\*$" "^\\*Flymake" "^\\*vc" "^\\*Warnings" "^\\*eldoc" "\\^*Shell Command")) (push regexp frog-jump-buffer-ignore-buffers))
This is the maximum number of buffers to show in the
frog-menu. The default is 12.
This is the default filter to use when invoking
frog-jump-buffer. Shows all buffers by default. If you would like to include recently killed buffers by default, you might want to set this to
nilto remove the current buffer from always being the first menu option. This is handy if you would prefer
ESCto be your menu dismissal command.
Explicit frame parameters to be used by the posframe
The posframe handler that
frog-jump-buffershould use. Defaults to
(point)being the bottom left point of the posframe.
Set to a non-nil value to use capital letters instead of numbers for the default filter actions instead of numbers.
nilto only use the filter actions defined in
This is an empty list available for adding user defined buffer filter actions to be available during
You can add your own custom filter actions. Each action is a list of the form
(KEY DESCRIPTION FILTER-FUNCTION). Each filter function receives a buffer as an argument and should return a non-nil value if that buffer should be considered display-worthy in
(defun frog-jump-buffer-filter-special-buffers (buffer) (with-current-buffer buffer (-any? #'derived-mode-p '(comint-mode magit-mode inf-ruby-mode rg-mode compilation-mode))))
(setq frog-jump-buffer-filter-actions '(("7" "[special]" frog-jump-buffer-filter-special-buffers)))
If you would like to call a function that uses a specific filter function by default, you can do so by defining a function like this:
(defun frog-jump-buffer-same-project () (interactive) (let ((frog-jump-buffer-current-filter-function #'frog-jump-buffer-filter-same-project)) (frog-jump-buffer)))
frog-menu-buffer.elfor more details.
When all-the-icons-ivy is available, an icon (which represents the file type) will be inserted in front of the buffer name, such that it is easier to spot the desired buffer to jump to. Here is a screenshot: