When input some code in orgmode, I can type:
and it expands to this:
This is fine for writing something from scratch. But most of the time, I'd copy some paragraph which contains some code. (Code interposed in paragraphs).
In this scenario, after Tab, I have to select the code snippet, cut and paste them between BEGIN and END. Or cut the END_SRC, paste it at the end of the code.
Is there a way to do this automatically?
The ideal process would be:
- Select some code
- run a command, the code is well formatted by the BEGIN, END markdowns.