Hacker News new | ask | show | jobs
by dr_kiszonka 1472 days ago
I type the same things over and over again. I would like an offline app that would capture everything I type (emails, code, reports) and create a library of snippets -- or better yet templates -- that I could access via a shortcut or a key combo.

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.

2 comments

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.

This is gold actually. I have an obsidian note where I store all my templates to serve this purpose!