5

GitHub - Overdr0ne/gumshoe

 3 years ago
source link: https://github.com/Overdr0ne/gumshoe
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Gumshoe: a spatial Point movement tracker

Introduction

Gumshoe is a global minor mode that quietly keeps tabs on your Point movements so you can retrace your steps if you ever need a reminder where you’ve been.

(This demonstrates the non-built-in consult-gumshoe command I describe below, because it’s the most visual. I usually just use gumshoe–backtrack-back/forward.)

Gumshoe does not keep track of every move you make, rather, only at increments of some minimum Euclidean distance from the last tracked position, like a leash. It will also automatically log a position if you’ve idled there for a configurable amount of time. This package is very similar to Vim’s jump list, just generalized for Emacs.

Installation

I just use straight+use-package like so:

(use-package gumshoe
  :straight (gumshoe :type git
                     :host github
                     :repo "Overdr0ne/gumshoe"
                     :branch "master")
  :config
  ;; The minor mode must be enabled to begin tracking
  (global-gumshoe-mode 1))

Usage

  • Once global-gumshoe-mode is enabled, gumshoe will automatically start recording movements into the gumshoe–log ringbuffer.
  • Use gumshoe-backtrack-back and gumshoe-backtrack-forward to jump backwards and forwards in the log.
  • Minibuffer autocompletion: Consult supports autocompletion of global(non buffer-local) marks. I’ve decided to remove built-in support for consult, because there are many great autocompletion packages out there. This is the one I use though, so here’s how I use it. You may define a consult function for gumshoe like so:
(defun consult-gumshoe ()
  (interactive)
  (consult-global-mark (ring-elements gumshoe--log)))

I then just added that to my use-package definition.

  • Configure Gumshoe’s euclidean follow distance by customizing the gumshoe–follow-distance variable.
  • Configure Gumshoe’s idle time by customizing the gumshoe-idle-time variable.
  • Configure the number of locations logged with the gumshoe-log-len variable.
  • Horizontal distance is scaled down by a factor of 3 by default, since columns are approximately that much narrower than rows, but you can modify gumshoe-horizontal-scale if you want.
  • If you use consult, gumshoe will load consult-gumshoe for you. This command allows you to browse the gumshoe–log interactively, just like consult-mark.

Similar Packages

If Gumshoe doesn’t suit you, here are some more Point history tracking packages that may.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK