Powerful editor

TrackBacks (0) Comments (0)
Here's something handy for vim power users.

:%s/.*/(&)/g
For those unfortunate souls out there who do not have a clue about what this might be, this regular expression global substitution command will enclose all lines in the current file within parentheses.

Or have even more fun by reversing all of the lines in a file by issuing the following succinct command:

:g/^/mo0
I'm just sawing swiftly through the book Learning the vi and Vim Editor and learning all kinds of nifty stuff to make my editing sessions even more efficient.

0 TrackBacks

Listed below are links to blogs that reference this entry: Powerful editor.

TrackBack URL for this entry: http://www.kiffingish.com/cgi-bin/mt/mt-tb.cgi/299

Leave a comment

Recent Entries

Best I ever had

I'd call that a bargain The best I ever had.who (1971)

Getting dark

At this rate it will soon be too dark for me to play golf in the afternoons anymore.Just a few

God is liefde

Driving home again on the highway, that big billboard on the side of the road always catches my attention. There

Eight years ago today

My father passed away exactly eight years ago today. Eight years may seem like a long time ago, but lately

Stand absolutely still

When Another Player is addressing the ball. There are only two things that every other player should be doing when