Change how evil-easymotion is lazy loaded
Fixes an issue where gs wouldn't work after an operator.
This commit is contained in:
parent
483a7caf0f
commit
bce0cc2152
3 changed files with 2 additions and 17 deletions
|
@ -65,7 +65,6 @@
|
|||
(:after man :map Man-mode-map
|
||||
:n "q" #'kill-current-buffer)
|
||||
|
||||
:m "gs" #'+evil/easymotion ; lazy-load `evil-easymotion'
|
||||
(:after (evil-org evil-easymotion)
|
||||
:map evil-org-mode-map
|
||||
:m "gsh" #'+org/goto-visible)
|
||||
|
|
|
@ -92,22 +92,6 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')."
|
|||
"Swap windows downward."
|
||||
(interactive) (+evil--window-swap 'down))
|
||||
|
||||
;;;###autoload
|
||||
(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)
|
||||
"Apply macro to each line."
|
||||
|
|
|
@ -201,6 +201,7 @@ directives. By default, this only recognizes C directives.")
|
|||
;;; Packages
|
||||
|
||||
(use-package! evil-easymotion
|
||||
:after-call pre-command-hook
|
||||
:commands evilem-create evilem-default-keybindings
|
||||
:config
|
||||
;; Use evil-search backend, instead of isearch
|
||||
|
@ -533,6 +534,7 @@ To change these keys see `+evil-repeat-keys'."
|
|||
|
||||
;; evil-easymotion (see `+evil/easymotion')
|
||||
(:after evil-easymotion
|
||||
:m "gs" evilem-map
|
||||
(:map evilem-map
|
||||
"a" (evilem-create #'evil-forward-arg)
|
||||
"A" (evilem-create #'evil-backward-arg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue