Published: 21 Jun 2018 › Updated: 21 Jun 2018

Indenting code blocks in Spacemacs org-mode
Org-mode (along with org-reveal) is an simple and easy to use method for creating documents and presentations in Spacemacs.
However, the default formatting for the code blocks isn't great. Here's how one can format code block:
- In org-mode, enter the code block (designated by #+BEGIN_SRC and #+END_SRC blocks) and type
C-c '
to open a new buffer with the source code in the block
- Type
M-m j =
to indent the whole buffer
- Type
, c
in the code block buffer to return the org-mode document (which also copies the indented code back.
Links:
- Issue on Github
Leave Indenting code blocks in Spacemacs org-mode to:
Read more #spacemacs posts
Best Posts From shark8me
We have not curated any of shark8me's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.