Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package binding hides a useful evil binding #3

Open
ambihelical opened this issue Aug 17, 2018 · 7 comments
Open

Package binding hides a useful evil binding #3

ambihelical opened this issue Aug 17, 2018 · 7 comments

Comments

@ambihelical
Copy link

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.

@ninrod
Copy link
Owner

ninrod commented Aug 17, 2018

interesting. g~ should not be lost if you rebind it. let me try to reproduce it.

@ambihelical
Copy link
Author

Yes, absolutely. I can rebind it, but I think the package should make it easier to avoid having to do this.

@ninrod
Copy link
Owner

ninrod commented Aug 17, 2018

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.

@ambihelical
Copy link
Author

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.

@VanLaser
Copy link

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)

@abeluck
Copy link

abeluck commented Jul 9, 2019

I ran into this today as well. I also use the defailt g~ for invert case.

@ninrod
Copy link
Owner

ninrod commented Jul 9, 2019

@VanLaser, you are doing a rebind on the client config, yes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants