vimtricks.wiki Concise Vim tricks, one at a time.

How do you use a macro to convert plain URLs to Markdown links?

Answer

qayiWi[<Esc>ea](<Esc>pa)<Esc>q

Explanation

Record a macro that yanks the URL, wraps the text before it in brackets, and appends the URL in parentheses for Markdown link format.

Next

How do you yank a single word into a named register?