Skip to content

donkey 1.5.0 — Mark run mode

Choose a tag to compare

@YardQuit YardQuit released this 04 Sep 07:49
· 383 commits to master since this release
708669b

M holds the m prefix down for you.

Marking a few words meant m w m w m b. Now the bare letters do it: M w w b
selects exactly what those three prefixed presses select. The first letter marks,
later letters grow the one selection, counts work, and object types mix freely —
M w s is the word grown forward to the end of its sentence. Any other key ends
the mode and does its ordinary job in the same press, so M w w d selects two
words and deletes them.

Pressed on a word, M arrives already holding it, so M d takes it. A selection
you already have — from v, V, or the m keys — is adopted rather than dropped.

The keys

w W b B s S words, symbols, sentences — forward and back
m p / m P paragraphs, since p and P stay the paste keys here
J / K whole lines, newline included, so M J d removes the line outright
h j k l adjust the near end
g h / g l own an end apiece, so they add up: M w g h g l takes the line's text
g g / g e / % the buffer's ends, and all of it
* trade which end the motions hold
u / U step the run back and forward, one press per step
M or C-g cancel

A reminder of the object keys stays in the echo area for as long as the mode is on.
M-x donkey-describe-bindings lists the full set — they live in a transient map that
C-h b would end before it could see it — and the tutor now teaches the mode by hand.

Reminders for v and m v

The two selections that had none now keep a line up for as long as they are live,
beside the ones V and M already had:

Linear selection: any motion extends, v re-anchors, C-g to cancel
Rectangle: any motion sizes the block, m v or C-g to cancel

Only one is ever on screen, and it goes when the selection does.

Fixes worth naming

  • A mistyped key leaves the run standing — including a mistyped sequence, m x
    for m w, which used to end the mode and let the next letter move point instead.
  • v and V are refused inside a run, with a message saying how to leave, rather
    than silently dropping the selection and anchoring a new one.
  • M over a rectangle drops the block and still starts a run. It used to cancel
    and return, and the obvious second press then selected a span nobody asked for.
  • Disabling donkey-mode leaves nothing behind: no hooks, no live position-ring
    markers, no armed map, no timer, no overlays, no advice.

Also new

CHANGELOG.org, covering every release since 1.0.0.