-
Notifications
You must be signed in to change notification settings - Fork 36
Description
First off, thanks for publishing this great plugin. It makes working with these lisps so much easier with Vim bindings.
Problem
Standard Vim keybindings use some of the changed keys as a prefix. Since the project will rebind those Vim defaults like <, >, [ and ] the new bindings are conflicting and a forced and inconvenient change. Right now the configurations either allow you to disable the feature all together or use the defaults.
I just started using evil-clevarparens. I really have enjoyed the simplicity and most of the opinions. But the following claim for the project is a bit inconsistent when there is no easy way to disable or change specific unwanted keybindings.
3. Provide but don't force additional features on the user.
Solution
One possibility could be just checking if the alist was already defined before defining that default alist thus requiring the user to configure that individual feature's key map.
Workaround
- Remove the key from the alist
- Add-to-list the new binding or
nil - run the setup function again
as an example:
(use-package evil-cleverparens
:config
;; rebind <, >
(rassq-delete-all 'evil-cp-> evil-cp-regular-bindings)
(rassq-delete-all 'evil-cp-< evil-cp-regular-bindings)
(add-to-list #'evil-cp-regular-bindings '("<" . evil-shift-left))
(add-to-list #'evil-cp-regular-bindings '(">" . evil-shift-right))
:hook ...)This gets unwieldy after changing several keys, but hopefully this could help another beginner like myself.