I want to ask something regarding making my own custom layout for spacemacs. I have read the documentation. They have an example like this:
This is the custom layout for ERC
buffers.
(spacemacs|define-custom-layout "@ERC"
:binding "E"
:body
(progn
;; hook to add all ERC buffers to the layout
(defun spacemacs-layouts/add-erc-buffer-to-persp ()
(persp-add-buffer (current-buffer)
(persp-get-by-name
erc-spacemacs-layout-name)))
(add-hook 'erc-mode-hook #'spacemacs-layouts/add-erc-buffer-to-persp)
;; Start ERC
(call-interactively 'erc)))
Since I am still beginner is Emacs Lisp, I don't really know what is happening here.
Let say I have four files in my home directory:
~/file1.org
~/file2.org
~/file3.org
~/file4.org
I want them automatically to be opened like this in my spacemacs:
|-----------+-----------|
| file1.org | file2.org |
| | |
| | |
|-----------+-----------|
| file3.org | file4.org |
| | |
| | |
|-----------+-----------|
Can anyone show me how can I achieve this (I am hoping that it comes with explanation since I am trying to learn through implementation)? Or at least can anyone tell me some keywords or Elisp functions that I can try to google on?
If it helps, I do regularly program in Python. So, a quite simple explanation is maybe enough for me.