When I'm using org-mode to take notes about a book, sometimes I'll copy/paste some code snippets into the note file. After pasting it, I'll
1. `C-c '` to call `org-edit-special`
2. `C-x h` to mark all the source code
3. `TAB` to format it
Is there a solution in org-mode for me that, after pasting code in #+BEGIN_SRC...#+END_SRC
, it will automatically format the code block or I can use just one key such as TAB
to format(indent) the whole source code block?
The default TAB
(typed in block, not using C-c '
) is just align all lines 2 columns after #+BEGIN_SRC
header, if there are spaces at the beginning of the second line, it will just add more spaces, it will not indent all lines like the 3 steps.