I’m sure all of our readers can type 70+ words a minute (right?), so no one really cares to make writing any quicker. That is, except for the fact that we’re a bunch of lazy bastards that hate data-entry tedium and loathe trying to grab snippets out of our clunky IDE’s. Even Zend’s snippet IDE leaves a lot to be desired - and it’s one of the best we’ve come across. To help alleviate the problem, LifeHacker’s got a tool called Texter built on the Autohotkey framework.
What Texter does is fairly simple - you write a “function” in Texter that keeps an eye out for when you type certain keywords. If you type a keyword then hit the trigger key, your keyword gets replaced with the function you wrote in Texter. It’s fun, really!
If none of this makes any sense to you, think of it this way: You’re sick of always having to write out switch statements with a default case of “return array(’Error’=>’Invalid switch variable’);” With Texter, all you’d have to do is type in a predefined string (maybe “defaultSwitch”), then hit a trigger key (any combination of tab, space, and enter) and Texter replaces your “defSwitch” text with the full switch statement you’ve previously defined.
So, go grab it already, so we can get started, would you?
Here’s the default screen for Texter. Easy enough. I’m not going to go through exactly how to use it, since Lifehacker has a pretty sweet video at the link above.

Texter especially works great when you’re always using variables in associative arrays. If you have a $results[’varaibleName’] style array, it’s easy to have Texter surround any text you want with the $results[”] tags.
My Top 10 Uses of Texter
- Surround strings with useful tags.
This goes double for PHP coding. Create a Texter Hotstring to replace ‘variableName’ with $results[’variableName’], or even “$query = ‘SELECT * FROM ‘.$variableName”. There are way, way too many ways to use Texter like this. - Build up a snippet library
Tired of making “for” loops? Make a hotstring called iFor, and have it instantly replace it with “for($i=0;$i<X;$i++){}”. You can even find some really hefty snippets that you use often to create hotstrings for, though keep in mind that if you’re pasting a large script more than once inside a project you might want to consider making a function or class from it. - Create comment blocks
This one’s pretty self explanatory. A “commentHeader” hotstring could put everything you need at the start of every script you write, with the variable spaces marked out for you. - Email Signatures
Maybe not directly related to coding, but typing “eSig” for me is a hell of a lot easier than trying to sign everything I want to. - Bookmarks
Now, this is just lazy on my part, but sometimes I’ll throw a bookmark into Texter instead of calling Launchy to do my business. I’ve got some fairly long URL’s I frequent, so I’ll replace “webinadeStats” with the URL of the statistics page. Wheee! - Quick HREF links and IMG tags
Yep - I too use that handy little hotstring the Lifehacker page gave us, except I use it for images too:<a href=”%c”>%|</a>
<img src=”%|”>
- Symbols
Anyone try using “•” or “©” and always forget the ALT Code? Me too. Store them in a “copyrightSym” hotstring and you never have to go searching again. - Fixing my shorthand
We’ve all been drawn into “kthx” and “lol” from time to time. Break the habit - “Thank you”, and “hahah” age you at least three or four years. - Web Forms
Store your address, your name, your phone number all in hotstrings and make checkout on new sites simple! I’d advise against storing the credit card number though.. - Command Line Mayhem
Do it! Yeah, replacing “ls” with “l” makes you a loser, but un-tarball your compressed files super quick, and jump straight to often used folders through your Putty SSH, or maybe even your Windows Command Line (ouch).
I do a bit more than this, but it’s all so application specific, I’m sure nobody would care to hear about it. Don’t take me the same way though! I’m dying to hear of other uses for Texter or Autohotkey, so leave a comment with how you use Texter.
3 Responses to “Top 10 Texter Uses for Code Monkeys”
Leave a Reply