GithubHelp home page GithubHelp logo

lingwu-sunshine / binky.el Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liuyinz/binky.el

0.0 0.0 0.0 1.12 MB

A package helping you jumping between buffers and files in Emacs

License: GNU General Public License v3.0

Emacs Lisp 100.00%

binky.el's Introduction

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

binky.el's People

Contributors

liuyinz avatar zenspider avatar syohex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.