Remove universal repeater on ; and ,
Ultimately, I didn't find this useful. Unifying n/N and ;/, was inconvenient when you wanted to repeat each kind of search independently (which happened more often than I had anticipated). What's more, it introduced another point of confusion for new users coming from vim. In the end, it's simply better to do as vim does. Fixes #3689
This commit is contained in:
parent
00a8f750ed
commit
77fbde957a
1 changed files with 0 additions and 36 deletions
|
@ -369,42 +369,6 @@ directives. By default, this only recognizes C directives.")
|
|||
;;
|
||||
;;; Keybinds
|
||||
|
||||
(defmacro set-repeater! (command next-func prev-func)
|
||||
"Makes ; and , the universal repeat-keys in evil-mode.
|
||||
To change these keys see `+evil-repeat-keys'."
|
||||
`(defadvice! ,(intern (format "+evil--repeat-%s-a" (doom-unquote command))) (&rest _)
|
||||
:after-while #',command
|
||||
(when +evil-repeat-keys
|
||||
(evil-define-key* 'motion 'local
|
||||
(kbd (car +evil-repeat-keys)) #',next-func
|
||||
(kbd (cdr +evil-repeat-keys)) #',prev-func))))
|
||||
|
||||
;; n/N
|
||||
(set-repeater! evil-ex-search-next evil-ex-search-next evil-ex-search-previous)
|
||||
(set-repeater! evil-ex-search-previous evil-ex-search-next evil-ex-search-previous)
|
||||
(set-repeater! evil-ex-search-forward evil-ex-search-next evil-ex-search-previous)
|
||||
(set-repeater! evil-ex-search-backward evil-ex-search-next evil-ex-search-previous)
|
||||
|
||||
;; f/F/t/T/s/S
|
||||
(after! evil-snipe
|
||||
(setq evil-snipe-repeat-keys nil
|
||||
evil-snipe-override-evil-repeat-keys nil) ; causes problems with remapped ;
|
||||
(set-repeater! evil-snipe-f evil-snipe-repeat evil-snipe-repeat-reverse)
|
||||
(set-repeater! evil-snipe-F evil-snipe-repeat evil-snipe-repeat-reverse)
|
||||
(set-repeater! evil-snipe-t evil-snipe-repeat evil-snipe-repeat-reverse)
|
||||
(set-repeater! evil-snipe-T evil-snipe-repeat evil-snipe-repeat-reverse)
|
||||
(set-repeater! evil-snipe-s evil-snipe-repeat evil-snipe-repeat-reverse)
|
||||
(set-repeater! evil-snipe-S evil-snipe-repeat evil-snipe-repeat-reverse)
|
||||
(set-repeater! evil-snipe-x evil-snipe-repeat evil-snipe-repeat-reverse)
|
||||
(set-repeater! evil-snipe-X evil-snipe-repeat evil-snipe-repeat-reverse))
|
||||
|
||||
;; */#
|
||||
(set-repeater! evil-visualstar/begin-search-forward
|
||||
evil-ex-search-next evil-ex-search-previous)
|
||||
(set-repeater! evil-visualstar/begin-search-backward
|
||||
evil-ex-search-previous evil-ex-search-next)
|
||||
|
||||
|
||||
;; Keybinds that have no Emacs+evil analogues (i.e. don't exist):
|
||||
;; zq - mark word at point as good word
|
||||
;; zw - mark word at point as bad
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue