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

Proper way to override zk binding? #14

Closed
zzantares opened this issue Oct 27, 2017 · 3 comments
Closed

Proper way to override zk binding? #14

zzantares opened this issue Oct 27, 2017 · 3 comments

Comments

@zzantares
Copy link

Hello there! So far enjoying the package however I have an issue, not necessarily with the package but with the jumping mappings zk and zj.

I don't use the qwerty layout and I'd rather prefer having zk for evil-vimish-fold/next-fold and zh for evil-vimish-fold/previous-fold. I'm trying to override the mappings but isn't working:

(use-package evil-vimish-fold
  :ensure t
  :after vimish-fold
  :config
  (evil-vimish-fold-mode 1)
  :general
  (:keymaps '(normal motion)
            "zh" 'evil-vimish-fold/previous-fold
            "zk" 'evil-vimish-fold/next-fold))

I've already tried with evil-define-key instead of general but I can't make it work. Can you give me a hand with this?

Thanks for any help!

@zzantares zzantares changed the title Proper way to override zk mapping? Proper way to override zk binding? Oct 27, 2017
@alexmurray
Copy link
Owner

What if you set them in evil-vimish-fold-map instead - perhaps give the following a try:

:config (progn 
           (evil-define-key 'normal evil-vimish-fold-map "zh" 'evil-vimish-fold/previous-fold)
           (evil-define-key 'normal evil-vimish-fold-map "zk" 'evil-vimish-fold/next-fold))

@zzantares
Copy link
Author

Yes! That works!

Thanks for the help @alexmurray!

@alexmurray
Copy link
Owner

You're welcome

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

2 participants