NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
here's some small improvements (Score:2)
The "ddp" switches the current line with the next. It is a variant on the very useful (especially for dyslexics) "xp" which swaps the current char with the next.
Actually, though, I would normally just swap the second args, instead of swapping the first args and then swapping the lines. Go to the 2'nd arg on the 1'st line (/\$CR), delete it (de), down to the start of the 2'nd arg on the 2'nd line (j), prepend the deleted arg (P), back to the start of the 2'nd 2'nd arg (l), delete it (dt'), up to the 2'nd arg pos in the 1'st line (kh), prepend it back (P).
Reply to This
vi is like perl (Score:2)
I found that my initial use of vi was adequate, but that every 6 months or a year I would read through the vi manual and pick a few more useful idioms and add them to the set that I knew well enough to use without thinking. After a few years of this, my vi repertoire was large enough that most of the new idioms I tried to learn were not useful o