0

I'd like to have two windows opened (vertical split) after startup of Spacemacs. How do I have to configure .spacemacs?

  • Would it work for you to have whatever window configuration you had on exit restored at startup? – Croad Langshan Jan 5 at 19:41
  • That would be even better! – thinwybk Jan 5 at 21:04
  • usually people upvote answers they accept also ;-) – Croad Langshan Jan 6 at 23:08
  • right. +1 upvote :) – thinwybk Jan 7 at 6:29
1

You can configure spacemacs to restore "layouts" (which are in fact persp-mode "perspectives", i.e. window configurations) from their saved state on disk. If you then do nothing else, spacemacs thinks you're using the "default layout" and will save that layout and restore it again on startup.

Find this line in your .spacemacs (SPC f e d to open that file):

   dotspacemacs-auto-resume-layouts nil

Edit that line as follows and save the file:

   dotspacemacs-auto-resume-layouts t

At that point, spacemacs should start up with whatever window configuration you left it in.

Note that layouts also provide "buffer isolation": if you create a new (non-default) layout, it won't see all buffers, only those that you associate with that layout by e.g. opening files. However if you're just working with a single layout (the default layout), that fact has no visible effect (in fact even if you use multiple layouts, I have a feeling that the default layout is also special and sees all buffers, even those opened only in other layouts -- not sure about that). More information here (that also covers "workspaces", which are similar but complementary: they are not saved to disk and do not provide buffer isolation).

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.