Productivity shortcuts for Windows using Autohotkey.
Run the script to get the shortcuts, or install as described below.
By default, they all use the Tab key to activate them. Very occasionally this can trigger unexpected (and confusing) behaviour with tab-completion, but it happens surprisingly rarely.
Most used:
-
Abbreviations:
btw
+Tab -> "by the way "eg
+Tab -> "e.g. "etc
+Tab -> "and so on. "ie
+Tab -> "i.e. "
(although, consider not using eg, ie, and etc at all).
-
TODO
+Tab: inserts an initialled and dated TODO like this, where you can then start typing:
TODO: ICM 2022-12-24: <type here>
- Similarly
HACK
,REV
(review), andSMELL
("code smell"):
HACK: ICM 2022-12-24: <type here>
(REVIEW: ICM 2022-12-24: <type here>)
SMELL: ICM 2023-12-26:
-
Note that for convenience these all work in lower case!
-
Signature:
SIG
+Tab: inserts an initialled and dated signature tag like this:
-- ICM 2024-06-22
-
rule
+Tab: inserts a set of rulers (rules) useful for judging line length where you don't have visible rulers, columns, right-hand margins, or column markers. Starts with a default selection of these:- Numbers
- Git short message
- Git message/plain text email wrap point
- 80 character line length
that looks something like this:
12345678901234567890123456789012345678901234567890123456789012345678901234567890
50------------------------------------------------
72----------------------------------------------------------------------
80------------------------------------------------------------------------------
There are examples for coding:
by
+Tab currently gives Doxygen-style comments using the Windows username:
//! @author <Username>
//! @date 2022-12-24
Examples for HTML/XHTM:
body
+Tab,h1
+Tab give:
<body>(cursor here)</body>
<h1>(cursor here)</h1>
(Some of the shorter ones require the leading <
to avoid mis-triggers, like
<a
, <b
, and <p
.)
hre
+Tab inserts an<a>
anchor, using the URL in the clipboard for thehref
attribute, like this:
<a href="https://example.com/">(cursor here)</a>
Examples for Textile (and old-style Confluence wiki):
{code
+Tab and{panel
+Tab
{code:none}<type here>{code}
{panel}<type here>{panel}
Edit the UserInitials
at the top of the file: this is used to customize
some of the shortcuts, such as todo
and hack
.
To run automatically at startup in Windows 10, see Add an app to run automatically at startup in Windows 10. This can be summarized as:
- Windows logo key + R to open Run dialog.
shell:startup
to open the (your?)Start-up
folder.- Copy the script file and Paste shortcut into the
Start-up
folder.