Hi, I have these words:

<p>1. I am good</p>
<p>2. You sucks!</p>
<p>3. Take that, moron</p>

I want to change those sentences into:
<p id="1">1. I am good</p>
<p id="2">2. You sucks!</p>
<p id="3">3. Take that, moron</p>

How do I do that using vim replace command?
All I can think  is this:
:%s/<p>\d/<p id="\d">\d/igc

But that does not work. Any idea? Yeah, I can change them using vim
macro or using scripting language but it will be nice if I can change
them using vim replace command.

Thank you.

Reply via email to