0

My goal is to bind SPC SPC to counsel-M-x.
I've tried using this snippet from this post

(use-package general
 :ensure t
 :config
 (general-evil-setup t)
 (general-define-key
  :states '(normal visual insert emacs)
  :prefix "SPC"
  "SPC" '(counsel-M-x :which-key "M-x")
   )
  )

I don't see any errors when I evaluate this snippet but it's not taking an effect, how should I proceed?

1

I think that you want to do this instead:

(general-define-key
 :keymaps 'normal
 :prefix "SPC"
 "SPC" '(counsel-M-x :which-key "M-x"))

You generally want to use :keymaps for the global evil state keymaps. See the readme for more details. Please make an issue on the general.el repository if you have further questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.