<p dir="ltr">Alex's visual block explanation is THE answer to the question you asked. You should really learn that.</p>
<p dir="ltr">I will add that while you can't do a number followed by a dot to repeat it N times (because that would do it all to the same line), this may be a good time for you to learn to record macros.</p>
<p dir="ltr">As you've discovered, you can repeat adding this text by doing:<br>
.0j<br>
On each line, which is: repeat the insert, go back to column 0, drop down a line</p>
<p dir="ltr">That's a real easy macro to start with. You hit q and any letter and it begins recording to the register named by that letter. Then you hit the keystrokes you want recorded. Stop recording by hitting q one more time. Play back any register by hitting @ followed by the letter. For me the fastest is to just use the q register. So that makes it:<br>
qq.0jq<br>
To record it, assuming you did the insert once before to get the dot ready to repeat, otherwise you could use I#<Esc> to record the insert. Then to replay it 10 times:<br>
10@q</p>
<p dir="ltr">I would be willing to show you these things in a shared tmux session if you are interested. I love teaching vim.</p>
<div class="gmail_quote">On Feb 5, 2013 7:00 PM, "Alex Carver" <<a href="mailto:agcarver%2Bale@acarver.net">agcarver+ale@acarver.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2/5/2013 15:09, Chris Fowler wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/05/2013 04:49 PM, JD wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you know the line number range, doesn't this work?<br>
<br>
7,53s/$/#_/g<br>
</blockquote>
<br>
That is one way and it works, but need to use ^ for beginning instead<br>
of the end of line.<br>
<br>
</blockquote>
<br>
There's also visual-block mode. Move to the first column of the first line you want to change, Ctrl-V then move the cursor down to the last line (you can use any cursor movement such as [n]j to move n lines down or use / to search for a keyword but then that will highlight extra columns so use 'h' to shrink back to one column). Now use captial i (I) to do a visual-block insert, type in the # once, press <ESC>, and move away from the line.<br>
<br>
Or you can do it during the mysql command and avoid hand editing completely. Pipe through sed on its way to the file:<br>
<br>
mysql .... | sed 's/^/#/g' >> <a href="http://perlfile.pl" target="_blank">perlfile.pl</a><br>
______________________________<u></u>_________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/<u></u>listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/<u></u>listinfo</a><br>
</blockquote></div>