## Saturday, 22 September 2012

### If you use Windows, please use AutoHotkey

AutoHotkey is a powertool for Windows. It is one of my indispensable tools. I can hardly praise it highly enough. I use it for many things. I have used it to make using Windows less painful, and coding Lisp easier. Here are a few samples of AutoHotkey I use it to:

Make Caps Lock type hyphen (-) instead (I use hyphen a lot - you can make it do what you want):
SetCapsLockState, AlwaysOff
CapsLock::-

Swap brackets to my liking. Once I started programming Lisp, I quickly realised that round brackets should be easier to type. I've swapped ( and ) with [ and ]. I've also made the closing brackets get typed in when you type one of the opening brackets: (, [, or {. This one was the whole reason I started looking for something like AutoHotkey. Nothing else I've found can do this on Windows.
; The dollar signs stop the hotkeys from going into an infinite loop.
$[::Send (){left}$]::Send )
$(::Send []{left}$)::Send ]
\$+[::Send +[+]{left}

Shorten some git workflow shortcuts (for example, typing gst then Enter is equivalent to typing git status then Enter):
SetTitleMatchMode 2
#IfWinActive, MINGW32:/
::gco::git checkout
::gcom::git checkout master
::gds::git diff --stat
::gdi::git diff
::gpu::git push -u
::gmm::git merge master
::gst::git status
::gct::git commit
::gcta::git commit -a

These and some other bits of AutoHotkey are packaged into a single script here.

I hope the above and linked script is useful to you; Use it however you want. I accept no responsibility for problems arising from it's use, but if you do find it useful, I'd be tickled pink to hear from you.