Skip to content

Instantly share code, notes, and snippets.

@smeech
Last active January 31, 2025 17:02
[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
Copy link
Author

smeech commented Jan 31, 2025

OnlineMinifyTools is helpful.

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