I am trying Spacemacs with emacs keybindings, so the commands starting with SPC, like SPC f e d, can be invoked by replacing SPC with M-m.

Since M-m is bound to back-to-indentation in stock emacs, I would like to remap the prefix M-m to M-n, so that I can then safely bind M-m to back-to-indentation.

How can I achieve this?


There are settings for the leader key in your .spacemacs file. I have remapped mine to Page Up, (which is represented as <prior> by emacs). Here's what I have in my .spacemacs:

;; The leader key
dotspacemacs-leader-key "<prior>"
;; The key used for Emacs commands (M-x) (after pressing on the leader key).
;; (default "SPC")
dotspacemacs-emacs-command-key "<prior>"
;; The key used for Vim Ex commands (default ":")
dotspacemacs-ex-command-key ":"
;; The leader key accessible in `emacs state' and `insert state'
;; (default "M-m")
dotspacemacs-emacs-leader-key "<prior>"

You may not need to set all three here as I have, start with just the leader key accessible in emacs state ("M-m") and see if that works.

| improve this answer | |

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.