« The Macworld SF 2005 best of show | Main | Upgrade to latest MT »

Line noise

I was editing some Perl code and I needed to comment the function I was working on, from the cursor till the end.

My editor of choice is vim for quite some years now, so I typed this:

:.,/^}/-1s/^/#/

It never ceases to amaze me as line noise can be so productive and intuitive if you know your editor and your regexps.

Contacts

melo@simplicidade.org (XMPP/email)
+351 302 029 050 (voice)
melopt (Skype)

IronMan challenge

Iron Man badge Are you ready to be an Iron Man? Join the challenge and find out! (what is the meaning of this little man?)

Moosaico

Junta-te!

Recent Comments

Powered by Disqus
Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.2