Emacs: Add Avy
This commit is contained in:
@@ -1,10 +1,33 @@
|
||||
(provide 'thoom-editing)
|
||||
|
||||
;; TODO Support org headings and comments
|
||||
(defun thoom/move-to-beginnings ()
|
||||
"Move between the two beginnings of a line: The very beginning, and the first non-whitespace character."
|
||||
"Move between the two beginnings of a line: The very beginning,
|
||||
and the first non-whitespace character."
|
||||
(interactive "^")
|
||||
(if (bolp)
|
||||
(back-to-indentation)
|
||||
(move-beginning-of-line 1)))
|
||||
|
||||
(global-set-key (kbd "C-a") #'thoom/move-to-beginnings)
|
||||
|
||||
(use-package emacs
|
||||
:bind (("C-a" . thoom/move-to-beginnings)))
|
||||
|
||||
;; Allow movement during isearch
|
||||
;; C/M-v move to next/previous match not currently visible
|
||||
;; M-</> move to first/last match in buffer
|
||||
(setq isearch-allow-motion t)
|
||||
|
||||
(use-package avy
|
||||
:ensure t
|
||||
:bind
|
||||
(("C-j" . avy-goto-char-timer)
|
||||
([remap goto-line] . avy-goto-line))
|
||||
|
||||
:init
|
||||
(avy-setup-default))
|
||||
|
||||
(use-package avy-zap
|
||||
:ensure t
|
||||
:bind (("C-z" . avy-zap-up-to-char-dwim)
|
||||
("M-z" . avy-zap-to-char-dwim)))
|
||||
|
||||
Reference in New Issue
Block a user