Sublime Text is by far the best text editor I've ever seen, and AutoHotKey is the scripting program I can't live without, especially the hotstrings feature, which allows me to create abbreviation-expansion pairs, speeding up the typing significantly. These two human inventions boost my day-to-day productivity in an unimaginable way. Recently I've been learning how to use Vim, and I'm getting comfortable enabling the "Vintage mode" in Sublime Text.
However, there is a major problem: the Vim commands can interfere with AutoHotKey's hotstrings. Let's say I have this hotstring:
::xeno::xenófobo
...which means, if it type "xeno" then it will expand to "xenófobo". However, in Vim, "xeno" would, sequentially, delete current line, then jump to end of word, then search for next occurence of input string, then open a new line. This is unwanted.
Even worse is it when the expansion part itself contains a meaningful Vim sequence:
::eve::Eddie Vedder
...which would jump to end of word, delete current line, switch to insert mode, insert "e Vedder". Absolutely catastrophic.
But AutoHotKey is powerful, and we can set it to ignore some windows. Example: if the active window has a string like " - Sublime Text"
in its title, we can have it ignore the hotstrings input. As for Sublime Text with Vim mode enabled, it will display "COMMAND MODE" or "INSERT MODE" in the status bar, not in the title bar! So AutoHotKey is unable to tell whether Sublime Text's Vim is currently on COMMAND or INSERT mode.
Is it possible to write a very simple plugin/package to Sublime Text just to have it display the words "COMMAND mode" or "INSERT mode" on the title bar when Vim is enabled? This could make AutoHotKey aware of the current mode and turn of the hostrings.