Powerful editor

 | Computers and stuff | 0 Comments | 0 TrackBacks
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.

No TrackBacks

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

Leave a comment

Recent Entries

Is Perl conducive to agile development?
Or perhaps better yet I should rephrase the title above and instead write: Is agile development conducive to Perl? For
Perfect birdie
This morning I had the perfect birdie. There was not the slightest hesitation in my mind. Three shots in a
Sunny days ahead
Looks like we've got some ideal golfing weather ahead, and I'm definitely going to take advantage of this fantastic
Offering advice
The problem with offering your opponent advice on the golf course is that if it helps then he beats you
Farrah Fawcett
I cannot believe that she died today.As a teenager I had the biggest crush on her and that poster of