Fix #2293: easymotion with evil operators
Reverts fix for #1672, but provides a workaround: (map! :n "gl" (λ! (+evil/easymotion 'normal 'global)))
This commit is contained in:
parent
c7ab4fafc6
commit
fe0c5e135d
2 changed files with 16 additions and 10 deletions
|
@ -93,13 +93,20 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')."
|
|||
(interactive) (+evil--window-swap 'down))
|
||||
|
||||
;;;###autoload
|
||||
(defun +evil/easymotion ()
|
||||
"Invoke and lazy-load `evil-easymotion' without compromising which-key
|
||||
integration."
|
||||
(interactive)
|
||||
(require 'evil-easymotion)
|
||||
(setq prefix-arg current-prefix-arg)
|
||||
(push '(t . easymotion) unread-command-events))
|
||||
(defun +evil/easymotion (&optional state keymap)
|
||||
"Invoke `evil-easymotion' lazily without compromising which-key integration."
|
||||
(interactive (list 'motion 'global))
|
||||
(let ((prefix (this-command-keys)))
|
||||
(require 'evil-easymotion)
|
||||
(evil-define-key* state keymap prefix evilem-map)
|
||||
(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
|
||||
nil
|
||||
t))
|
||||
prefix)))))
|
||||
|
||||
;;;###autoload (autoload '+evil:apply-macro "editor/evil/autoload/evil" nil t)
|
||||
(evil-define-operator +evil:apply-macro (beg end)
|
||||
|
|
|
@ -206,7 +206,6 @@ directives. By default, this only recognizes C directives.")
|
|||
(use-package! evil-easymotion
|
||||
:commands evilem-create evilem-default-keybindings
|
||||
:config
|
||||
(evilem-default-keybindings "<easymotion>")
|
||||
;; Use evil-search backend, instead of isearch
|
||||
(evilem-make-motion evilem-motion-search-next #'evil-ex-search-next
|
||||
:bind ((evil-ex-search-highlight-all nil)))
|
||||
|
@ -552,9 +551,9 @@ To change these keys see `+evil-repeat-keys'."
|
|||
:textobj "k" #'evil-indent-plus-i-indent-up #'evil-indent-plus-a-indent-up
|
||||
:textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr
|
||||
|
||||
;; evil-easymotion
|
||||
;; evil-easymotion (see `+evil/easymotion')
|
||||
(:after evil-easymotion
|
||||
(:prefix "<easymotion>" ; see `+evil/easymotion'
|
||||
(:map evilem-map
|
||||
"a" (evilem-create #'evil-forward-arg)
|
||||
"A" (evilem-create #'evil-backward-arg)
|
||||
"s" #'evil-avy-goto-char-2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue