hlissner / evil-snipe

2-char searching ala vim-sneak & vim-seek, for evil-mode
MIT License
336 stars 25 forks source link

Snipe repeat not working when key is rebound #57

Closed LemonBreezes closed 6 years ago

LemonBreezes commented 6 years ago

When changing the key-bindings of f and t the repeat feature does not rebind. Also, (evil-snipe-def 1 inclusive "f" "F") (evil-snipe-def 1 exclusive "t" "T") does not fix this for me.

hlissner commented 6 years ago

To rebind, try:

;; First declare the commands:
;; assuming you want to rebind f/F to a/A:
(evil-snipe-def 1 inclusive "a" "A")
;; and t/T to b/B
(evil-snipe-def 1 exclusive "b" "B")

;; then bind the keys:
(evil-define-key* 'motion evil-snipe-local-mode-map
  "a" #'evil-snipe-a
  "A" #'evil-snipe-A
  "b" #'evil-snipe-b
  "B" #'evil-snipe-B)
LemonBreezes commented 6 years ago

Thank you very much. Your snippet did the trick!