Skip to content

A package helping you jumping between buffers and files in Emacs

License

Notifications You must be signed in to change notification settings

liuyinz/binky.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

binky

License GPL 3 MELPA

Jump between points like a rabbit !

This package provides commands to jump between points in buffers and files. Pin position, float position and last jump position are all supported in same mechanism like point-to-register' and register-to-point' but with an enhanced experience.

Contents

Screenshot

  • Call M-x binky-* related command

binky with preview

? for toggle preview manually, C-g or escape for quit, SPC to toggle in groups

  • Call M-x binky-margin-mode

margin with sign

  • Or use mark as indicator, (setq binky-margin-string nil)

margin with mark

Install

dependencies

  • Emacs, version >= 26.3
  • dash

package

  • Manually

Clone and add to load-path, require the package.

  • Melpa

This package is available on MELPA. Install with M-x package-install RET binky within Emacs.

Usage

;; Directly
(require 'binky)
(binky-mode)
;; margin highlight support
(require 'binky-margin)
(binky-margin-mode)

;; Or with `use-package`, etc
(use-package binky
  :hook (after-init-hook . (lambda () (binky-mode) (binky-margin-mode))))
  • binky-binky : one command to rule all

    • press j, if record j exists, call binky-jump, otherwise call binky-add to add pin record.
    • press J, if record j exists, call binky-jump, otherwise call binky-add to add float record.
    • press ;j, call binky-jump-other-window.
    • press ,j, call binky-view.
    • press .j, call binky-delete to delete j record.

    With C-u prefix, keep editing until quit

  • binky-margin-mode : toggle to enable or disable margin indicator feature

  • binky-next-in-buffer/binky-previous-in-buffer: jump between in current buffer

  • binky-save/binky-restore: save and restore pin records from file

Customization

Lots of options are provided, see customization part in file.

Feature

  • Better UI experience than register-to-point, such as preview customization, jump highlight and margin indicator
  • Integration with buffers switch to record last point position as float position
  • Vim-like mark and jump style.

Comparison

Dogears

  • Bookmark style record
  • More information: relevance, within, directory, etc

Binky

  • Register style record
  • Vim-like mark and jump
  • Flexible and customizable

I have used dogears for several months, and it's great in most features except lack of Vim-marks style jumping feature which is top priority for me. While evil is too heavy, so I wrote this package to imitate parts of features.

Enjoy it.

Todo

  • Avoid adding duplicated records
  • Margin indicator support
  • More sorting strategy: frecency, duration
  • Add SPC to toggle preview records in groups
  • Show same buffer records first in groups view
  • Add command to store records cross sessions
  • optimize preview color and style for easily lookup
  • support for xref history
  • Fringe indicator support

FAQ

  • binky-margin conflicts with other packages like flymake, flycheck, diff-hl, linum-mode(built-in), etc ?

    binky supports only margin for now, so solutions here :

    • Use fringe in other packages
    ;; flycheck
    ;; Use left-fringe or right-fringe
     (setq flycheck-indication-mode 'left-fringe)
    
    ;; diff-hl
    ;; use fringe by default, don't turn on diff-hl-margin-mode
    
    ;; linum-mode
    ;; don't support fringe, use display-line-numbers-mode (since 26.0.50) instead
    • Use different side of margin in other packages
    (setq binky-indicator-side 'left)
    
    ;; flycheck, different margin side
    (setq flycheck-indication-mode 'right-margin)
    
    ;; diff-hl, different margin side
    (setq diff-hl-side 'right)
    (diff-hl-margin-mode)
  • All records position change to 1 after run format-all-buffer command ?

    format-all formats buffer by overwriting it's entire content, all markers position would be change to position 1. Please use other formatters like apheleia instead.

Donate

If you think the it's helpful for you, please consider paying a cup of coffee for me. Thank you! 😄

PayPal

About

A package helping you jumping between buffers and files in Emacs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published