evil-toggle-key, take two
Hi, while adjusting my config to use evil-toggle-key I noticed that I have to set it before loading evil - of course d'oh - or use custom. Because the code in the custom is rather longish and it would be nice to set it without custom I think of adding a `evil-set-toggle-key' fun. But where should it go? - Into vars because, well, it's for setting the var - Into maps because it's for the mapping - Into states because it's related to the states - create a new file for user adjustments and convenience and what not. In the mean-time I'll go with the last option for my topic branch. Michael
On 9 Aug 2011, Michael Markert wrote:
...
- Into vars because, well, it's for setting the var - Into maps because it's for the mapping - Into states because it's related to the states - create a new file for user adjustments and convenience and what not.
In the mean-time I'll go with the last option for my topic branch.
Make that first. Hadn't thought of cycles (don't want to duplicate the code in the custom) :/ Michael
On 2011-08-09 02:22 +0200, Michael Markert wrote:
Because the code in the custom is rather longish and it would be nice to set it without custom I think of adding a `evil-set-toggle-key' fun. But where should it go?
Place it in evil-common.el after `evil-redirect-digit-argument'. It is clearly a keymap function, but evil-maps.el should contain `define-key' calls only for the sake of readability. -- Vegard
On 9 Aug 2011, Vegard Øye wrote:
On 2011-08-09 02:22 +0200, Michael Markert wrote:
Because the code in the custom is rather longish and it would be nice to set it without custom I think of adding a `evil-set-toggle-key' fun. But where should it go?
Place it in evil-common.el after `evil-redirect-digit-argument'. It is clearly a keymap function, but evil-maps.el should contain `define-key' calls only for the sake of readability.
Well that falls into the same circular require trap I spoke of in the other post: evil-common requires evil-var and evil-var requires evil-common if we want setting `evil-toggle-key' to work when set via custom. That is if we don't want to duplicate the code. Michael
On 2011-08-09 16:34 +0200, Michael Markert wrote:
On 9 Aug 2011, Vegard Øye wrote:
Place it in evil-common.el after `evil-redirect-digit-argument'.
Well that falls into the same circular require trap I spoke of in the other post: evil-common requires evil-var and evil-var requires evil-common if we want setting `evil-toggle-key' to work when set via custom.
Ah, of course. Well, then evil-vars.el it is. Added in commit 13e3054. -- Vegard
participants (2)
-
Michael Markert -
Vegard Øye