Fix gs in org-mode #2218
Also makes +evil/easymotion generic; it can now be moved to any key, and new keys can be added to the <easymotion> event, rather than having to wait for evilem-map to become available. Also fixes +org/goto-visible if used before avy is loaded. Relevant to #1672
This commit is contained in:
parent
bff04ed35c
commit
27cabea6b6
3 changed files with 6 additions and 12 deletions
|
@ -87,7 +87,8 @@
|
||||||
:m "gs" #'+evil/easymotion ; lazy-load `evil-easymotion'
|
:m "gs" #'+evil/easymotion ; lazy-load `evil-easymotion'
|
||||||
(:after org
|
(:after org
|
||||||
:map org-mode-map
|
:map org-mode-map
|
||||||
:m "gsh" #'+org/goto-visible)
|
:prefix "<easymotion>"
|
||||||
|
"h" #'+org/goto-visible)
|
||||||
|
|
||||||
(:when (featurep! :editor multiple-cursors)
|
(:when (featurep! :editor multiple-cursors)
|
||||||
:prefix "gz"
|
:prefix "gz"
|
||||||
|
|
|
@ -88,17 +88,9 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')."
|
||||||
"Invoke and lazy-load `evil-easymotion' without compromising which-key
|
"Invoke and lazy-load `evil-easymotion' without compromising which-key
|
||||||
integration."
|
integration."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((prefix (this-command-keys)))
|
(evilem-default-keybindings "<easymotion>")
|
||||||
(evil-define-key* 'motion 'global prefix nil)
|
(setq prefix-arg current-prefix-arg)
|
||||||
(evilem-default-keybindings (key-description prefix))
|
(push '(t . easymotion) unread-command-events))
|
||||||
(setq prefix-arg current-prefix-arg
|
|
||||||
unread-command-events
|
|
||||||
(mapcar (lambda (e) (cons t e))
|
|
||||||
(vconcat (when evil-this-operator
|
|
||||||
(where-is-internal evil-this-operator
|
|
||||||
evil-normal-state-map
|
|
||||||
t))
|
|
||||||
prefix)))))
|
|
||||||
|
|
||||||
;;;###autoload (autoload '+evil:apply-macro "editor/evil/autoload/evil" nil t)
|
;;;###autoload (autoload '+evil:apply-macro "editor/evil/autoload/evil" nil t)
|
||||||
(evil-define-operator +evil:apply-macro (beg end)
|
(evil-define-operator +evil:apply-macro (beg end)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +org-headline-avy ()
|
(defun +org-headline-avy ()
|
||||||
"TODO"
|
"TODO"
|
||||||
|
(require 'avy)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(when-let* ((org-reverse-note-order t)
|
(when-let* ((org-reverse-note-order t)
|
||||||
(pos (avy-with avy-goto-line (avy-jump (rx bol (1+ "*") (1+ blank))))))
|
(pos (avy-with avy-goto-line (avy-jump (rx bol (1+ "*") (1+ blank))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue