options to disable evil-cp-> evil-cp-< keybindings
Closed this issue · 3 comments
It's not in Evil Cleverparens Use Additional Bindings
or Evil Cleverparens Use Additional Movement Keys
.
I'm using hook to disable it to get evil-shift
back.
I'm sure there's a slightly better or cleaner way to do this, but for those interested, this is what I'm using at the moment:
(defun brds/evil-cp-modify-regular-bindings (&rest r)
(setq evil-cp-regular-bindings
(remove-if (lambda (key-string)
(member key-string '("_" ">" "<")))
evil-cp-regular-bindings
:key 'car)))
(advice-add 'evil-cp--enable-regular-bindings :before
#'brds/evil-cp-modify-regular-bindings)
I would accept a PR for this. This was my first proper Emacs package that I ever wrote, so I am not sure if the way I did the keybindings was the greatest way to do it, but I don't currently have time to think of a smarter way to handle it.
I'm confused by this issue. The following in your config should work just fine. No need for hooks or advice, unless I'm missing something:
(evil-define-key 'normal evil-cleverparens-mode-map "<" nil)
(evil-define-key 'visual evil-cleverparens-mode-map "<" nil)
(evil-define-key 'normal evil-cleverparens-mode-map ">" nil)
(evil-define-key 'visual evil-cleverparens-mode-map ">" nil)
or to save some precious chars:
(dolist (state '(normal visual))
(dolist (key '("<" ">"))
(evil-define-key state evil-cleverparens-mode-map key nil)))
I'll close this issue as it's 7yrs old, but feel free to re-open if need be.