dotjay.co.uk

18 September 2007 : Quick Tip: speedier PHP/CSS commenting

Continuing in the vein of “the obvious ones are often overlooked,” here’s another quick productivity tip!

When you want to type a comment in a PHP or CSS file, speed things up a little by using the / and * keys on the numeric keypad. On (most) laptops, hold down the Function (Fn) key to access the overlaid numeric keypad.

Back when I used to use a full-size keyboard, I would use the / and * keys on the numeric keypad to quickly insert comments into my PHP or CSS. It was so much quicker than using / and Shift+8 keystrokes.

When problems with RSI last year encouraged me to switch to using a compact keyboard, I missed that shortcut. However, I quickly realised that I could hold down the Function (Fn) key on my new keyboard to quickly access the overlaid numeric keypad.

I recently bought myself a MacBook Pro and have just figured out that I can do the same thing. Holding down Function (Fn) allows me to access the numeric keypad and my quick way of typing comments. Yay!

6 Comments

Comment 1

Great tip, kimosabi. Now all we need is the numeric / Fn-activated keys to be back-lit in an alternative colour when Fn is depressed and the world would be much improved.

Jon, 18 September 2007 at 1509

Comment 2

I didn’t know that – useful tip, cheers!

LornaJane, 18 September 2007 at 1509

Comment 3

@Jon Tan: I love the backlit keyboard on the MacBook Pro, but lighting the numeric keypad would be a very useful feature. A suggestion to put into Mr. Jobs!

dotjay, 18 September 2007 at 1531

Comment 4

Duh – never even thought about those keys being there! Nice tip. :)

Matthew Pennell, 19 September 2007 at 0950

Comment 5

I use this a lot, and it’s one of the reasons I don’t like laptops much. :)

With a Swedish keyboard layout the character sequence on the alphanumeric keypad is even more awkward. I often switch to the U.S. keyboard layout when coding, though, since it provides much better access to characters like square brackets, curly braces and (for PHP) the ‘$’ character.

Tommy Olsson, 19 September 2007 at 1212

Comment 6

D’oh, didn’t even realize. No more shifting… automatic commenting from now on I guess. Thanks Jon, good tip. Just gotta retrain my fingers now.

Mike Cherim, 25 September 2007 at 1704

Commenting is closed for this entry, but please contact me to share your thoughts.

Jon Gibbins is a web developer and accessibility geek; dotjay.co.uk is his online home.

Associating

Site Information

dotjay.co.uk is published with Textpattern. There are feeds.

Copyright

© 2004–2008 Jon Gibbins (dotjay). Some rights reserved.

Except where otherwise noted, content on this site has a Creative Commons License.