A recent convert to Spacemacs and I'm having trouble trying to change the keybindings in customize mode.

From a customize buffer I can change the state with M-m SPC evil-evilified-state and then it works as I expect (navigation, using SPC as leader; to be able to insert into the search bar properly you need to go back to emacs mode with C-z but I can live with that).

Trying to set this in my config with variants of (evil-set-initial-state 'custom-mode 'evil,normal,insert,and so on...) and nothing I've tried thus far is working.

Related: https://github.com/syl20bnr/spacemacs/issues/6699

1 Answer 1


I would recommend the recently published evil collection, which solves this problem not only for customize, but also for many of the other modes in emacs. If you just want the customize functionality, this file appears to be the relevant one to customize-mode, and I think it ticks off your boxes sans the SPC leader, but I think that could be rectified with something like:

(evil-define-key 'normal custom-mode-map
  (kbd "SPC j") 'widget-forward
  (kbd "SPC k") 'widget-backward)

Unfortunately I'm not entirely sure how/if this works into spacemacs as I don't have much experience with it, and I tend to avoid customize mode, but worst comes to worst the aforementioned code could probably be dropped into your .spacemacs file along side the file in the evil collection.

As for the issue with getting evil to set the initial state for custom mode, That file appears to capitalize the C in 'Custom-mode, and although I've never seen a capitalized major mode name in source, emacs is case sensitive.

Hope this solves your problem!

  • 2
    Argh, capitalisation! 'Custom-mode works as I expected now. evil collection looks really interesting, will be giving it a shot. Thanks for the answer Commented Jan 9, 2018 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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