I want to comment out a piece of code. For instance this snippet:
foo
bar
foo
Should become this:
<!--foo
bar
foo-->
So I type the following sequence:
vap:norm '<i<!--<C-v><Esc>'>A-->
This give me the following result, which is unexpected for me:
<!--<!--<!--foo
bar
foo-->-->-->
I understand that a Normal mode command on a range is executed on each line of this range, right?
My question is: is it possible to execute the Normal mode command only on the first/last line of a range and if so, how can I do this?