Looking for the spacemacs answer to this question.

How do I have spacemacs open as if I had issued SPC w m (spacemacs/toggle-maximize-buffer)?

I thought it might be dotspacemacs-maximized-at-startup, but this affects the frame.

  • 1
    Have you tried adding spacemacs/toggle-maximize-buffer to window-setup-hook? Similar to what is shown in the update here emacs.stackexchange.com/a/36369/36872 where (add-hook 'window-setup-hook #'delete-other-windows) was used instead.
    – c_48
    Commented Feb 8, 2022 at 23:35
  • Incredible! That worked: (add-hook 'window-setup-hook 'spacemacs/toggle-maximize-buffer). I don't think the # is needed though. Please add this as an answer!
    – mcp
    Commented Feb 26, 2022 at 22:41
  • 1
    @young_souvlaki The # is indeed not strictly necessary, but you'll often see it recommended as good style, since it distinguishes general symbols from function symbols for the benefit of the (human) reader, as well as the compiler.
    – Basil
    Commented Feb 26, 2022 at 22:50
  • Thank you for the clarification!
    – mcp
    Commented Feb 28, 2022 at 1:52

1 Answer 1


One way is to add spacemacs/toggle-maximize-buffer to window-setup-hook:

(add-hook 'window-setup-hook #'spacemacs/toggle-maximize-buffer)

Add this to the dotspacemacs/user-init function of your .spacemacs file.

Similar to what is shown in the update here, where (add-hook 'window-setup-hook #'delete-other-windows) was used instead.

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.