I solemnly promise to come back and do this properly.

Vim mapping to markdown-ize Powershell history

:map B /CommandLine<Cr>i&lt;CR&gt;&lt;CR&gt;&lt;Esc&gt;/:&lt;Cr&gt;wi&lt;CR&gt;&lt;CR&gt;<CR><CR><Esc>