21 Feb 2013

Finite Keystrokes Before Death : Making the Most of Them

[caption id=“attachment_526” align=“alignleft” width=“300”] By: ericnvntr[/caption] The idea that we possess a finite number of keystrokes to consume before death is an ominous consideration. That’s the concept mentioned in one of RubyFreelancer’s archived shows by Eric Davis (if I remember correctly). I believe he’s quoting another person in the episode when he talks about having a finite number of keystrokes remaining. I’ve been using a text expander, i.e. snippet application, to help manage the repetitive work of typing. Common phrases or sentences that I use are added as re-usable phrases to a handy program called Dash. Dash observes when keystrokes are entered and if a trigger keyword is used, such as ‘iirc’, the program replaces that text with ‘if I recall correctly’. Dash also allows the phrase to have replaceable variables, just like you would expect fom ‘Yasnippet’ or ‘Snipmate’. As a bonus feature, Dash serves the dual purpose of being a ‘Heads Up Display’ style documentation viewer. It’s a great way to lookup STDLIB info from Ruby or CSS info. The only drawback that I’ve found is needing to manually generate Rdocs since my system settings for RVM do not install them. I accomplished this using the following script:   I’ve used the text expansion feature to save thousands of keystrokes in repetitive form entries where other automated solutions are not available. Try it out and let me know what you think in the comments or on Twitter @_ZPH. Oh yeah and map the HUD to something easy to remember like CMD-CTRL-SHIFT D. I keep all of my system-wide shortcuts on the same triple modifier chord so that they’re unlikely to overwrite standard shortcuts :). What other methods do you have for reducing repetition?