Skip to content

Instantly share code, notes, and snippets.

@rawsyntax
Created June 21, 2011 15:37
Show Gist options
  • Save rawsyntax/1038120 to your computer and use it in GitHub Desktop.
Save rawsyntax/1038120 to your computer and use it in GitHub Desktop.
;; make zap-to-char act like zap-up-to-char
(defadvice zap-to-char (after my-zap-to-char-advice (arg char) activate)
"Kill up to the ARG'th occurence of CHAR, and leave CHAR.
The CHAR is replaced and the point is put before CHAR."
(insert char)
(forward-char -1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment