How to transform {{{...}}} to markdown code blocks with sed or vim? <p>How can I transform comments like</p> <pre><code>{{{ abc def }}} </code></pre> <p>to markdown comments like</p> <pre><code> abc def </code></pre> <p>(4 spaces at the start of each line) in vim or sed?</p> <p>I tried the following but I didn't get the spaces after the first line:</p> <pre><code>:%s/{{{\n\(\_.*\)\n}}}/ \1/ </code></pre>