1

(Spacemacs)

M-% starts query-replace, and when a match is found, ? shows help, which indicates:

Type Space or ‘y’ to replace one match, Delete or ‘n’ to skip to next,

However, pressing Space simply inserts a space rather than replacing text (y still works). As a long time emacs user, this is a frustrating loss of functionality. Any suggestions on how it can be reinstituted?

1
  • Just to be sure... Do you see the same thing when you start Emacs using emacs -Q (no init file) - however that might be done with Spacemacs? If not, the bisect your init file to find the culprit.
    – Drew
    Aug 24 at 16:48
1

It seems to be a recent Spacemacs change of the Emacs defaults. Either set dotspacemacs-use-SPC-as-y to t in your dotspacemacs/init

(defun dotspacemacs/init ()
  (setq-default

   ... ;; all the other dospacemacs-* variables 

   ;; Accept SPC as y for prompts if non nil. (default nil)
   dotspacemacs-use-SPC-as-y t))

or do (define-key query-replace-map " " 'act) in your dotspacemacs/user-config to return to the classic behavior.

1
  • 1
    be sure to add the value for dotspacemacs-use-SPC-as-y inside the setq-default list of the dotspacemacs/init function. I edited the answer to be cleaner
    – Émilien
    Sep 7 at 6:44

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.