Warning: Trying to access array offset on value of type bool in /home/curtis/curtisgibby.com/blog/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 60

Warning: Trying to access array offset on value of type bool in /home/curtis/curtisgibby.com/blog/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 60

Warning: Trying to access array offset on value of type bool in /home/curtis/curtisgibby.com/blog/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 60

Warning: Trying to access array offset on value of type bool in /home/curtis/curtisgibby.com/blog/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 60

Warning: Trying to access array offset on value of type bool in /home/curtis/curtisgibby.com/blog/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 60

Warning: Trying to access array offset on value of type bool in /home/curtis/curtisgibby.com/blog/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 60

Warning: Trying to access array offset on value of type bool in /home/curtis/curtisgibby.com/blog/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 60

Warning: Trying to access array offset on value of type bool in /home/curtis/curtisgibby.com/blog/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 60

Like using a shotgun to kill a fly

For years, I’ve been using programs to replace small snippets of text in my programming. I type

`z

and the program outputs

cd /var/replicate/Replicate/trunk/app

and hits enter for me. This is much faster than typing out the whole path (even with Bash tab completion), or password, or chunk of code (whatever I happen to have in that shortcut).

I had a few dozen of these quick key replacements that probably saved me hundreds or thousands of hours over the years. The backtick character ` was great for triggering them, since it hardly ever gets used otherwise, even in programming, where you’re constantly using other generally-obscure symbols like &*{}[]|. I had quite the muscle memory built up for my various shortcuts. I could hit

`1`6

in quick succession and know that I’d get a debug of the variable in my clipboard, followed by an exit statement.

I started with the decent ShortKeys program (which was where I picked up the habit of using backtick as a trigger), then a couple of years ago I got tired of its nag-ware reminders and moved over to the excellent free Texter (from Lifehacker’s Adam Pash). But when I got a new 64-bit Windows 7 system at home, quickly followed by a 64-bit Win8 setup at work, I realized that Texter has severe problems on 64-bit systems. My main problem was that regular Windows drag-and-drop operations were being blocked, plus sometimes key combinations weren’t being triggered, and sometimes I’d get double text lliikkee tthhiiss.

So I went looking for a 64-bit compatible replacement for Texter. Most of the suggestions were to use AutoHotkey, but I considered that overkill. I didn’t need to remap complete Windows key combinations or simulate mouse clicks, just do a little text-replacement.

I tried a couple of other programs that didn’t work out: PhraseExpress (clunky, non-commercial use only) and Auspex (buggy, crashy) before coming back around to try AutoHotkey. I found that it was the perfect replacement for me — I learned how to use its scripting system to exactly replicate the shortcuts that I’d had in Texter, plus a lot more. Another nice thing is that its configuration is all text-based, so I don’t have to mess with a GUI to add another shortcut, and I can sync my configuration over Dropbox. I still think that it’s overkill (like using a shotgun to kill a fly), but it’s the best solution I’ve found.

Here’s my configuration:


:*:``\::- Curtis
:*:``-::[sensitive string]
:*:``1::echo "^v : " pr($^v); // debug{!}
:*:``6::exit(); // debug{!}
:*:``9::soundconcepts.com
:*C:``*::[sensitive string]
:*C:``$::[sensitive string]
:*C:``a::apache2ctl -k graceful{Enter}
:*C:``ba::Bad Apostrophe
:*C:``bna::Bad Non-Apostrophe
:*C:``C::cgibby
:*C:``c::curtis
:*C:``e::[sensitive string]
:*C:``m::@mailinator.com
:*C:``o::cd /var/orderform/ordersystem/trunk/{Enter}
:*C:``p::<?php ?>{Left}{Left}
:*C:``P::[sensitive string]
:*C:``r::rm tmp/cache/models/{Enter}rm tmp/cache/persistent/{Enter}
:*C:``t::[sensitive string]
:*C:``W::cd /var/welcomekit/app/{Enter}
:*C:``w::[sensitive string]
:*C:``x::svn update{Enter}
:*C:``Z::/var/zijaweb/app{Enter}
:*C:``z::cd /var/replicate/Replicate/trunk/app{Enter}
::functino::function

This entry was posted on Thursday, November 15th, 2012 at 8:16 am and is filed under Programming, Work. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply


Warning: Undefined variable $user_ID in /home/curtis/curtisgibby.com/blog/wp-content/themes/stylized/comments.php on line 77