Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPackage binding hides a useful evil binding #3
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ninrod
Aug 17, 2018
Owner
interesting. g~ should not be lost if you rebind it. let me try to reproduce it.
|
interesting. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ambihelical
Aug 17, 2018
Yes, absolutely. I can rebind it, but I think the package should make it easier to avoid having to do this.
ambihelical
commented
Aug 17, 2018
|
Yes, absolutely. I can rebind it, but I think the package should make it easier to avoid having to do this. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ninrod
Aug 17, 2018
Owner
Well, this should be easy, but apparently I cannot make it work because I'm horrible at elisp.
So I've posted a question in SO.
If this questions gets answered, or if somehow I find the solution, I'll quickly fix it.
|
Well, this should be easy, but apparently I cannot make it work because I'm horrible at elisp. So I've posted a question in SO. If this questions gets answered, or if somehow I find the solution, I'll quickly fix it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ambihelical
Aug 18, 2018
I am for sure no better an elisp programmer. But I think you should be able to make a defcustom for the key, with default value of "g~", or (kbd "g~") if you want and then pass that variable to define-key. I don't think kbd is really needed except for some kinds of key definitions, but I am not sure.
ambihelical
commented
Aug 18, 2018
|
I am for sure no better an elisp programmer. But I think you should be able to make a defcustom for the key, with default value of "g~", or (kbd "g~") if you want and then pass that variable to define-key. I don't think kbd is really needed except for some kinds of key definitions, but I am not sure. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
VanLaser
Sep 10, 2018
I tested with this code, which works. Emacs 26.1:
(defcustom evil-test-key "g~"
"Key for a test text object."
:type 'string)
(setq evil-test-key "g~")
(define-key evil-normal-state-map (kbd evil-test-key) 'evil-operator-eval)
VanLaser
commented
Sep 10, 2018
|
I tested with this code, which works. Emacs 26.1: (defcustom evil-test-key "g~"
"Key for a test text object."
:type 'string)
(setq evil-test-key "g~")
(define-key evil-normal-state-map (kbd evil-test-key) 'evil-operator-eval) |
ambihelical commentedAug 17, 2018
The binding for g~ defined by evil (evil-invert-case) is actually useful. I bind evil-operator-string-inflection to g- which is a great mnemonic, easier to type and currently unused in evil. However g~ is still lost unless I rebind it. Consider a different binding or making the default binding optional.