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 Responses to “Quick Tip: speedier PHP/CSS commenting”
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.
I didn’t know that – useful tip, cheers!
@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!
Duh – never even thought about those keys being there! Nice tip. š
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.
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.