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
✅ @shark8me, I gave you an upvote on your first post! Please give me a follow and I will give you a follow in return!
Please also take a moment to read this post regarding bad behavior on Steemit.