Categories
geek programming tips windows

global autocorrect in Windows

Autocorrect or auto-replace is a great productivity tool. You can use it to automatically fix misspelled words (“teh” instead of “the”), or have it autocomplete stuff like “krg” to “Kind regards, n3wjack”. Word and Outlook have it built in, and Vim has it too, but it’s kind of annoying that you have to set it up everywhere, and that some tools simply don’t support it.

Wouldn’t it be great if you could have autocorrect working everywhere in Windows? Enter AutoHotkey!
This neat little tool allows you to set up autocorrect replacements that work in any text entry field. They work in Notepad, VS Code, even in text areas in your browser.

Once installed, you right-click the program icon in your system tray and choose “Edit This Script” to edit the active script. Add something like this to add some auto-replace rules:

::teh::the
::rg::Regards,{enter}n3wjack
::krg::Kind regards,{enter}n3wjack
:::flip::(╯°□°)╯︵ ┻━┻
::Lorem1::Lorem ipsum dolor sit amet, consectetur adipiscing elit...

You get the idea. The ::‘s are used to indicate you’re setting up AutoHotkey “hotstrings”. Simply put, it will auto-replace the first bit, with the last bit. There are more details in the excellent manual.

Afterward, save the file and choose “Reload This Script” on the system tray icon. Your autocorrects will now be available anywhere in Windows.

AutoHotkey is a full-blown automation tool, btw. The autocorrection is just a small tip of the iceberg. If you want to learn more, check out the manual to see what you can do with its scripting language.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.