public
Created

Emacs function to fix fantasai's right hand being off-by-one when scribing.

  • Download Gist
gistfile1.el
Emacs Lisp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
(defun right-hand-querty-correct (b e)
"Fix fantasai's right hand being off by one."
(interactive "r")
(let ((right-hand-keys "
67890-=
yuiop[]\\
hjkl;'
bnm,./"))
(goto-char b)
(while (not (= (point) e))
(let ((p (position (char-after) right-hand-keys)))
(when (and p
(> p 0)
(not (= ?\n
(elt right-hand-keys (1- p)))))
(delete-char 1)
(insert (elt right-hand-keys (1- p)))))
(goto-char (1+ (point))))))

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.