Dynamic Matches

PHOTO EMBED

Mon Dec 05 2022 21:19:38 GMT+0000 (Coordinated Universal Time)

Saved by @savabeh191

- trigger: ":now"
  replace: "It's {{mytime}}"
  vars:
    - name: mytime
      type: date
      params:
        format: "%H:%M"
content_copyCOPY

For this type of Matches there will be two additional concepts variable and extensions. Variable: it is use on the replace clause to include the output of a dynamic component. Extension: It is the dynamic component that will produce an output that will be take place of the variable on the replace clause. 1. The Trigger is :now. 2. Te replace close "It's {{mytime}}" contain the variable {{mytime}}. 3. now the dynamic component will be on the next part that start with vars. vars: - name: mytime type: date In these lines we define the variable mytime as a date type. In this example the Date Extension is use The most important part of this extension is the format parameter params: format: "%H:%M"

https://cubevic.github.io/My_notes/Miscellaneous/Espanso.html#cursor_hints