I found the command
SPC m x c to insert a small code snippet like
~~. I would like to insert a longer snippet like
Is there a command to do this? I found a way to add it for markdown, which is
SPC m x c
Yes, it's called easy templates.
Org mode supports insertion of empty structural elements (like ‘#+BEGIN_SRC’ and ‘#+END_SRC’ pairs) with just a few key strokes. This is achieved through a native template expansion mechanism. Note that Emacs has several other template mechanisms which could be used in a similar way, for example ‘yasnippet’.
To insert a structural element, type a ‘<’, followed by a template selector and ‘TAB’. Completion takes effect only when the above keystrokes are typed on a line by itself.
For your precise question:
<s then TAB.
See others in the documentation.
Note it's not specific to spacemacs, since it's from native org-mode