Skip to content

Instantly share code, notes, and snippets.

@smeech
Last active January 31, 2025 17:02
Show Gist options
  • Select an option

  • Save smeech/55ceff0f1fc6b2b64b900e5ddf42a51f to your computer and use it in GitHub Desktop.

Select an option

Save smeech/55ceff0f1fc6b2b64b900e5ddf42a51f to your computer and use it in GitHub Desktop.
[Minimised variables] A compact way of listing multiple variables for e.g. a list form. #espanso
# Espanso minimised variables used in a list Form
# https://onlineyamltools.com/minify-yaml is helpful
- trigger: :td1
replace: "{{Output.Date}}"
vars:
- {name: Day, type: date, params: {format: '%d'}}
- {name: Month, type: date, params: {format: '%m'}}
- {name: Year2, type: date, params: {format: '%y'}}
- {name: Year4, type: date, params: {format: '%Y'}}
- {name: Another, type: date, params: {format: '%A, %B %d, %Y'}}
- name: Output
type: form
params:
layout: '[[Date]]'
fields:
Date:
type: list
values:
- '{{Day}}/{{Month}}/{{Year2}}'
- '{{Day}}-{{Month}}-{{Year2}}'
- '{{Day}}/{{Month}}/{{Year4}}'
- '{{Another}}'
@smeech

smeech commented Jan 31, 2025

Copy link
Copy Markdown
Author

OnlineMinifyTools is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment