Emacs kaizen: ace-jump-zap lets you use C-u to zap to any character
Posted: - Modified: | emacsI'm perpetually using M-z
to zap-to-char
and then typing the character back in, because I really should be using zap-up-to-char
instead. But if I'm going to get the hang of fiddling with my muscle memory so that I do things the Right Way, I might as well use this opportunity to practise using ace-jump-zap
instead. The ace-jump-zap-up-to-char-dwim
and ace-jump-zap-to-char-dwim
functions behave like their normal equivalents, but if you C-u
them, you get ace-jump
type behaviour allowing you to quickly zap to any character you see. And since I mentally think of M-z
as not including the character, I may as well map it so that M-z
behaves that way.
Now I just have to remember that C-u
does cool stuff…
(use-package ace-jump-zap :ensure ace-jump-zap :bind (("M-z" . ace-jump-zap-up-to-char-dwim) ("C-M-z" . ace-jump-zap-to-char-dwim)))
You can comment with Disqus or you can e-mail me at sacha@sachachua.com.