There's a program for this, https://espanso.org/ You can add some trigger words in the YAML file.
for example :
- trigger: ":date"
replace: "{{mydate}}"
vars:
- name: mydate
type: date
params:
format: "%m/%d/%Y"
If I type : date (without the space) it would automatically convert it to 06/08/2022. It's pretty cool.I also found this one https://www.autohotkey.com/ but I haven't tried it yet.
Re:Ask HN: What Is Your Problem?
by rishikeshs on Wednesday June 08, 2022 @10:38AM
(#31668026)
This is gold actually. I have an obsidian note where I store all my templates to serve this purpose!
For example, it would automatically recognize the five different email signatures I type often and make them accessible by typing, say, ”xxsig” followed by pressing TAB to cycle through the five signatures. I would also want it to learn how I write docstrings and generate templates that I could access via another keyword.