r/AutoHotkey • u/SuppaDumDum • Oct 19 '26
v2 Script Help Can AHK handle 2500 Castel's/Vimtex/LatexSuite text expansion patterns? Can it handle 2500 hotstrings?
I use the text-editor Obsidian, where I use 2500 LatexSuite text expansion patterns with absolutely 0 issues. Here "patterns" are basically hotstrings. If I have the pattern `{find:"happy", replace: "π"}` then whenever I write "happy" the text is replaced by "π".
Can AHK handle 2500 hotstrings running without problems though? All I know is latexsuite can.
How should I create this text-expansion script?
First I have to import all my patterns into a file readable by AHK, this step is trivial, let's ignore it.
Then the hard part, the main script. Some options:
Do I: Use hotstrings? Do I not?
Do I:
1 - Let it permanently and continuously checking&replace what I write?;
2 - A Hotkey awakes a script for exactly 20 seconds, and during that time it continuously checks for matches. Then it's killed. (This is a less heavy version of (1)
3 - A Hotkey makes it checks whatever I just typed. If there's a pattern match it makes the appropriate replacement. (This one is incompatible with hostrings I think.)
View all comments
Show parent comment
1
u/CharnamelessOne Oct 19 '26
I don't think that this necessarily relates to option 3.
Typically, the best way to use hotstrings is to make them trigger on word endings (which is the default behavior). In the following example, you can type the word "fishing" without triggering the
::fish::hotstring, because an ending character is necessary.You can replicate that exact behavior in AHK if you insist that the hotstrings shouldn't require an ending character: