Articles
TextAnvil: Fix Text Where It Sits
I have been fixing song titles typed in ALL CAPS for longer than I care to admit. Mp3Tag is open, the title field says "THE BEST OF ME (LIVE)", and the AutoHotKey app I had originally written posted the clipboard to my ColdFusion Taffy API endpoint, waited, and returned back the modified value to be pasted back. Six steps for one title case. It also meant every title I touched had to take a round trip to the internet.
So I wrote TextAnvil. Select text in any Windows program, press Ctrl+Shift+E, press t, and the selection is updated to "The Best of Me (Live)". Your clipboard is put back the way it was. Nothing leaves your machine.
It is free, MIT licensed, and written in AutoHotkey v2. The project page with screenshots is at https://www.mycfml.com/textanvil/ and the source and downloads are at https://github.com/JamoCA/textanvil/.
What It Does
TextAnvil waits in the system tray. The hotkey (or Ctrl+right-click) opens a menu at the text caret with a letter in front of every item. Thirty transforms, grouped:
- Case: UPPERCASE, lowercase, Sentence case, Title Case, Capitalize Each Word, tOGGLE cASE.
- Code: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, URL slug, and KeyString, which is the "Hello_Worlds_Cafe" style of key I have used in CFML for years.
- Cleanup: Transliterate to ASCII, Straighten quotes and dashes, Strip HTML, Collapse whitespace, Remove extra spaces, Fix hidden whitespace, Remove line breaks, Trim each line.
- Special: Pseudolocalize (three variants), Insert zero-width spaces, Remove zero-width characters.
- Output: Paste as plain text, and Type it out, which types the clipboard character by character for fields that refuse Ctrl+V.

If nothing is selected, it works on the clipboard. Press Ctrl+P and the menu stays open as a palette, and each click then acts on whatever you have selected in the active window. That is how forty titles get fixed in a row.
Title Case is the one I use most, so it got the most attention. Small words stay lowercase, DJ and USA stay uppercase, Roman numerals survive, and all three word lists are editable in the settings. Protection is on by default, so a URL, an email address, a GUID, an @handle, or a #hashtag in the middle of the selection passes through unchanged.
The Whitespace You Cannot See
Here is the part I am most pleased with, because it comes from a bug that cost me actual days.
Back in 2019 I wrote whitespace.cfc, a ColdFusion component that identifies and trims the whitespace characters that trim() does not. The reason was a state code. A customer pasted "CA" from Excel, Excel had quietly appended a no-break space (U+00A0), and "CA" plus an invisible character does not equal "CA". The lookup failed, nothing threw, and the record sat there wrong until someone noticed.
That table of characters is now the heart of TextAnvil's Stats column. When the menu opens, it counts words, characters, lines, sentences, URLs, and emails, and if the selection holds anything outside the plain space, tab, line feed, and carriage return, a yellow line says so:

More stats opens a window that names each character by code point, tells you how many there are, where the first one sits, and whether anything trims it:

Three tiers, because that is how the real world sorts them. Plain whitespace, which everything trims. Characters trimmed by some runtimes and not others (the no-break space is the famous one: .NET trims it, Java and ColdFusion do not). It also fixes characters that nothing trims: the zero width space (ZWSP), the joiners, the byte order mark (BOM), and the Mongolian vowel separator. Hidden whitespace turns the "space-likes" into one plain space each and removes the rest.
The "More" stats window also reports reading time, Flesch reading ease, average word and sentence length, unique words, and the longest word. The readability bands and the syllable heuristic follow TextStatsAnalyzer by kunkel321, which is a much deeper tool if you want letter frequencies, n-grams, and stopword filters over a whole file. TextAnvil's version is the glance-at-it subset for a paragraph you just selected.
Where the Rest Came From
Most of TextAnvil is ColdFusion code that I had already written... now ported to AutoHotkey.
The pseudolocalization transforms are from ColdFusion Pseudolocalization for Generating "Fake Translations". Pseudolocalize swaps Latin letters for look-alike accented ones so a layout can be tested with foreign-looking text that an English speaker can still read. The one-letter-per-word variant is the one I use to get a phrase past a lazy keyword filter. And there is a reverse, because somebody will paste pseudolocalized text into the wrong place eventually. Placeholders like {name}, HTML tags, and entities are left alone.
Transliterate to ASCII uses the AnyAscii table from Convert Unicode to ASCII7 using AnyASCII Java Library. Greek, Cyrillic, CJK, accented letters, Punycode look-alikes, and emoji all come out as readable ASCII. The data (ISC licensed, by Hunter WB) is compiled into the exe, so there is no Java and no JAR to find.
"Type it out" grew out of an old AutoHotkey gist, EmulateTyping.ahk, which pasted the clipboard one character at a time for fields that block pasting. The TextAnvil version pauses while you hold a modifier key so a character never lands as a shortcut, stops on Escape, and types line breaks as spaces unless you tell it otherwise. It never presses Enter for you.
I have used Lintalist for years and recommend it to anyone who types the same things over and over. I started with it to replace the snippet features in my IDEs and editors. Each program that I reviewed integrated snippets a little differently, and I got tired of adding the same shortcuts to each program on each PC. Lintalist allowed me to have a single portable set of snippets and shortcuts that work on any PCs without having to install anything. It is also built on AutoHotkey, and the two complement each other without arguing. Lintalist gets text into the document. TextAnvil changes the text that is already there.
Terminals, and the Ctrl+C problem
One rule I had from the start: TextAnvil must never send Ctrl+C into a terminal. A terminal with nothing selected reads Ctrl+C as an interrupt, and killing someone's running process to copy a word is not a feature. So in Windows Terminal, the console host, PuTTY, and the other usual suspects (the list is editable), TextAnvil works on the clipboard and leaves the result there for you to paste. The menu title bar says "terminal" when this applies.
The Command Line Option
The same exe is a command-line tool. textanvil-cli.exe --type title "SOME TITLE" prints the title case; --type striphtml,title chains transforms; --stats --json prints the full statistics set with fixed keys. With --json the output is pure ASCII on stdout, every non-ASCII character escaped, so it survives whatever charset cfexecute decodes with.
anvil = new TextAnvilClient( exePath="C:\tools\TextAnvil\textanvil-cli.exe" );
title = anvil.transform( "THE BEST OF ME (LIVE)", "title" ); // The Best of Me (Live)
key = anvil.transform( "<p>Hi & bye</p>", "striphtml,keystring" ); // Hi_bye
TextAnvilClient.cfc ships in the source and runs on Adobe ColdFusion 2016 and later and on Lucee. The CLI never writes beside itself, so it is safe under a service account in a read-only folder.
(Do not name the instance client. That is a built-in scope, and on Adobe ColdFusion the assignment lands in the scope struct instead of a variable. Ask me how I know.)
Settings That You Can Read
Everything lives in TextAnvil.ini, a plain text file beside the program. There is a Settings window for the hotkey, the mouse gesture, start at sign-in, which items show and in which column, three themes (Graphite, Ember, and Phosphor), the typing pace, the terminal list, and the Title Case word lists. Quick start, Help, and About pages are built in. Or open the ini in Notepad and choose Reload from the tray.

Get It
Download the zip from https://github.com/JamoCA/TextAnvil/releases/latest, unzip anywhere, and run TextAnvil.exe. No installer, no registry, no account. Windows 10 or 11, 64-bit.
The executables are not signed, so SmartScreen will ask the first time. A code-signing certificate costs more than this project is worth to me. If that bothers you, install AutoHotkey v2 and run source\TextAnvil.ahk directly; it is the same code, and you can read all of it.
Bugs, ideas, and "it broke in this program" reports go to https://github.com/JamoCA/TextAnvil/issues.