Code Monkey home page Code Monkey logo

binky.el's Issues

Linum-mode?

Is there any conflict between binky-margin-mode and linum-mode?
While linum-mode is enabled binky margin symbols are not displayed.

Always says mark is overwritten

Small thing, but when binky-overwrite is true, setting a mark always results in the message "Mark is overwritten", even if the mark did not exist before.

Great package, thanks.

Jump to next / previous mark in current buffer

Hi,

I've recently discovered this package and I'm enjoying it, but there are a couple of missing features I'd like.
The first one is indicators in the fringe, that I've seen it's on your TODO list.
The second one is the capacity to jump to next / previous marker in current buffer with no need to open the preview and remember the character associated with the mark.

I've written this feature. Possibly var and commands comments should be improved.
What do you think?

(defcustom binky-jump-cycle t
  "If non-nil, cycle to first mark if not next, or last mark if not previous."
  :type 'boolean
  :group 'binky)

(defun binky-jump-to-next-marker-in-buffer ()
  "Jump to next marker in current buffer.  If no more, jump to first."
  (interactive)
  (if-let* ((buf (current-buffer))
            (pt (point))
            (mks (seq-sort #'(lambda (b1 b2) (< (marker-position b1) (marker-position b2)))
                           (seq-keep #'(lambda (b) (and (eq buf (marker-buffer (cdr b))) (cdr b)))
                                     (binky--manual-preview))))
            (mk (seq-find #'(lambda (mk) (> (marker-position mk) pt)) mks)))
      (goto-char mk)
    (when (and mks binky-jump-cycle)
      (goto-char (car mks)))))

(defun binky-jump-to-prev-marker-in-buffer ()
  "Jump to previous marker in current buffer.  If no more, jump to last."
  (interactive)
  (if-let* ((buf (current-buffer))
            (pt (point))
            (mks (seq-sort #'(lambda (b1 b2) (> (marker-position b1) (marker-position b2)))
                           (seq-keep #'(lambda (b) (and (eq buf (marker-buffer (cdr b))) (cdr b)))
                                     (binky--manual-preview))))
            (mk (seq-find #'(lambda (mk) (< (marker-position mk) pt)) mks)))
      (goto-char mk)
    (when (and mks binky-jump-cycle)
      (goto-char (car mks)))))

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.