I'm not sure if this is possible, but Vim constantly surprises me. What I'd like to be able to do is take the formatting of one block of text and apply it to a selection. Assuming several lines like this:
<li><a href="#"><span>Something Here</span><i class="icon"></i></a></li>
<li><a href="#"><span>Something Here</span><i class="icon"></i></a></li>
<li><a href="#"><span>Something Here</span><i class="icon"></i></a></li>
I'd like to format one of the lines:
<li>
<a href="#">
<span>Something Here</span>
<i class="icon"></i>
</a>
</li>
And then apply that formatting to the remaining lines. Again, no clue if this is doable, but it would be very neat if it could - I often have to implement HTML templates where there are long lines that may have 5 or 6 nested tags within, often starting with an indentation that is quite out there.
Do you know the recording feature of vim? Try to do following:
q
+ some character
to enter the recording modeq
to exit the recording mode@
+ some character
to reproduce recorded operations