I can use it in other applications such as notepad, but it just won't work with vs code.It seems that there is a bug or did I do any thing wrong? For example
::td::TODO
and every time I will get a different result:
How to fix this?
I can use it in other applications such as notepad, but it just won't work with vs code.It seems that there is a bug or did I do any thing wrong? For example
::td::TODO
and every time I will get a different result:
How to fix this?
It is a bug from an extension Markdown All in One It is fine when I disabled it.
Autohotkey workaround:
::td::{Sleep 100}TODO
Increase the 100ms as the hotstring (to delete) becomes larger. On my machine I could expand hotstrings with length 25 in 250ms. Your mileage may vary.
I replaced my hotstrings en masse with the following regex:
Search: ::[a-z0-9_-]+::(?!\{)
Replace: $0{Sleep 250}
In the Github issue Mehul has another workaround:
:SE, K1:td::TODO
This does not require a variable amount of ms as it will always work regardless of hotstring length but it took so long to print the replacement text I found it unworkable.
I really didn't want to disable the Markdown all in one
extension.
Going off of @Laoujin's workaround, this works perfectly for me.
The below hotstring will type out the current date when type qcd (not terminating character). If VSCode is active, it waits 100 milliseconds.
:*:qcd::
FormatTime, timeString, , MM/dd/yyyy
typeText(timeString)
return
typeText(text) {
IfWinActive, Visual Studio Code
Sleep, 100
SendInput, %text%
}