AutoYADM commit: 2025-07-09 14:22:03

This commit is contained in:
Daniel Fichtinger 2025-07-09 14:22:03 -04:00
parent 0947338afb
commit ee833820f0
3 changed files with 17 additions and 9 deletions

View file

@ -4,12 +4,16 @@ define-command markdown-fmt %{
# block level images regex
set-register / '(?S)^\h*!\[.*\]\(.*\)$'
# select, yank, replace with comment
execute-keys '%s<ret>"lyc<lt>!--img𝅙img--<gt><esc>'
try %{
execute-keys '%s<ret>"lyc<lt>!--img𝅙img--<gt><esc>'
}
# pass to formatter
format
# select the comments, replace with original image
set-register / '(?S)^\h*<!--img𝅙img-->'
execute-keys '%s<ret>"lR'
try %{
execute-keys '%s<ret>"lR'
}
}
}

View file

@ -0,0 +1,11 @@
define-command \
-docstring %{
Insert the date, with the args passed as a string
to date -d
} \
insert-date -params 1.. %{
evaluate-commands -draft -save-regs '|' %{
set-register | "date -d '%arg{@}' -f +%%Y-%%m-%%d"
execute-keys '|<ret>'
}
}