Skip to content

Instantly share code, notes, and snippets.

@VernonGrant
Created March 24, 2023 15:14
Show Gist options
  • Save VernonGrant/1341a3bdcded3fc3a3741427f706ca85 to your computer and use it in GitHub Desktop.
Save VernonGrant/1341a3bdcded3fc3a3741427f706ca85 to your computer and use it in GitHub Desktop.
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