[ale] Appending in VIM
Alex Carver
agcarver+ale at acarver.net
Tue Feb 5 19:00:10 EST 2013
On 2/5/2013 15:09, Chris Fowler wrote:
> On 02/05/2013 04:49 PM, JD wrote:
>> If you know the line number range, doesn't this work?
>>
>> 7,53s/$/#_/g
>
> That is one way and it works, but need to use ^ for beginning instead
> of the end of line.
>
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.
Or you can do it during the mysql command and avoid hand editing
completely. Pipe through sed on its way to the file:
mysql .... | sed 's/^/#/g' >> perlfile.pl
More information about the Ale
mailing list