• Stars
    star
    158
  • Rank 237,131 (Top 5 %)
  • Language
    Emacs Lisp
  • Created over 5 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The fastest buffer-jumping Emacs lisp package around

Frog Jump Buffer

Description

frog-jump-buffer is the fastest buffer-jumping Emacs lisp package around. It is the spiritual successor to ace-jump-buffer and is powered by avy via frog-menu. Just like ace-jump-buffer, it allows you to hop to any Emacs buffer in 2-3 key strokes.

example

Installation

You can install it from MELPA with M-x package-install or here’s a basic use-package declaration:

(use-package frog-jump-buffer :ensure t)

Usage

(frog-jump-buffer)

This is the main entry-point. Bind it to your preferred key-binding.

It opens the frog-menu buffer selector. The buffers appear in order of most recent display or selection.

Selecting the avy character next to a buffer switches to that buffer.

Use 0 to toggle between opening in the same window or (other-window).

The numbers 1 through 6 will cycle through the default buffer filters:

  • 1: show all buffers in the (buffer-list)
  • 2: filter buffers to the same mode as current-buffer
  • 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 current-buffer (requires projectiile to be installed)
  • 6: filter buffers to similarly named buffers. (i.e. if (current-buffer) is frog.html, show frog.css, *magit: frog*, etc.)

Variables

frog-jump-buffer-ignore-buffers

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))

frog-jump-buffer-max-buffers

This is the maximum number of buffers to show in the frog-menu. The default is 12.

frog-jump-buffer-default-filter

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 frog-jump-buffer-filter-recentf.

frog-jump-buffer-include-current-buffer

Set to nil to remove the current buffer from always being the first menu option. This is handy if you would prefer ESC to be your menu dismissal command.

frog-jump-buffer-posframe-parameters

Explicit frame parameters to be used by the posframe frog-jump-buffer creates.

frog-jump-buffer-posframe-handler

The posframe handler that frog-jump-buffer should use. Defaults to (point) being the bottom left point of the posframe.

frog-jump-buffer-default-filters-capital-letters

Set to a non-nil value to use capital letters instead of numbers for the default filter actions instead of numbers.

frog-jump-buffer-use-default-filter-actions

Set to nil to only use the filter actions defined in frog-jump-buffer-filter-actions.

frog-jump-buffer-filter-actions

This is an empty list available for adding user defined buffer filter actions to be available during frog-jump-buffer.

frog-jump-buffer-project-package

Set the project package to use. Defaults to the popular projectile if it is installed. You can set it to project if you have Emacs 28+ installed, or this will be the default if projectile is not available.

Custom Filter Actions

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 frog-menu-buffer.

Example usage:

(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)))

See frog-menu-buffer.el for more details.

all-the-icons-ivy integration

To opt into experimental support for icons via all-the-icons-ivy, install that package and enable the defcustom variable:

(setq frog-jump-buffer-use-all-the-icons-ivy t)

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:

withIcon

More Repositories

1

apropospriate-theme

A colorful, low-contrast, light & dark theme set for Emacs with a fun name
Emacs Lisp
307
star
2

turboboost

Enhanced AJAX handling for Rails apps
Ruby
166
star
3

ace-jump-buffer

Super fast Emacs buffer switching extension for avy
Emacs Lisp
69
star
4

use-package-ensure-system-package

auto installing system binaries the emacs way
Emacs Lisp
47
star
5

ace-jump-zap

Emacs character zapping, ace-jump-mode style
Emacs Lisp
42
star
6

hoardable

ActiveRecord versioning and soft-deletion with Postgres using uni-temporal inherited tables
Ruby
35
star
7

hemacs

one man's opinionated emacs setup
Emacs Lisp
33
star
8

use-package-chords

key-chord keyword for use-package
Emacs Lisp
23
star
9

org-repo-todo

Simple repository todo management with org-mode
Emacs Lisp
21
star
10

activerecord-exclusive-arc

💫 An ActiveRecord extension for implementing polymorphic relationships as exclusive arcs
Ruby
19
star
11

popup-kill-ring

browse your emacs kill ring in an autocomplete style popup menu
Emacs Lisp
18
star
12

projector.el

lightweight Emacs library for managing project/repository-aware shell and shell command buffers
Emacs Lisp
15
star
13

vscode-todoist

VSCode extension for Todoist
TypeScript
11
star
14

strapi-ruby

Simple Ruby classes for Strapi content types
Ruby
8
star
15

foreman.el

a super simple lisp for running foreman in Emacs
Emacs Lisp
3
star
16

transform-string-at-point

Emacs package for transforming the string at point between camelcase, snakecase, upcase, downcase, etc
Emacs Lisp
1
star
17

director

JavaScript plugin for dynamic template decorating from declarative attributes
CoffeeScript
1
star