[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Appending in VIM
- Subject: [ale] Appending in VIM
- From: fletch at phydeaux.org (Mike Fletcher)
- Date: Tue, 5 Feb 2013 18:54:25 -0500
- In-reply-to: <[email protected]>
- References: <[email protected]>
On Feb 5, 2013, at 16:20, Chris Fowler <cfowler at outpostsentinel.com> wrote:
> Here is a quickie.
>
> A lot of times I add mysql describe <table name> output to a perl program as comments. I execute mysql ... >> name.pl and then I move the lines to where I want and add '# ' to the beginning of each line. The first line I'll do I then # then space, and then esc. The other lines I hit the period to execute the last edit.
>
> Is there a way I can tell vim to append '#_' to N lines?
Tmtowtdi, of course. Why not just add it on the way in before editing?
mysql ... | perl -pE 's/^/# /' >> name.pl