How Do I Change Wrap a Word in Quotes using Vi?
According to http://vimregex.com, the {-} construct will do a non-greedy match. I've been searching for this for a long time. For instance, let's say I have used inline quotes for a Markdown doc and I want to change them to bold using HTML syntax. In other words go from this:
`HelloJoe`
to this
<b>HelloJoe<b>
I can use this Vi command:
:g/`\(\w*\)\{-}`/s;;<b>\1</b>;gp