Skip to content

Instantly share code, notes, and snippets.

@VernonGrant
Created March 24, 2023 15:14
Embed
What would you like to do?
Zap up to char, but without the mini buffer prompt.
;; Zap up to char quickly.
(defun vg-quick-zap-up-to-char (p c)
"The same as zap up to char, but without the mini buffer prompt.
P: The prefix argument or the count.
C: The character to zap up to."
(interactive "P\nc")
(let ((cnt (cond ((null p) 1)
((symbolp p) -1)
(t p))))
(zap-up-to-char cnt c)))
(define-key global-map (kbd "C-z") 'vg-quick-zap-up-to-char)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment