dots/src/.config/nvim/ultisnips/typst.snippets

80 lines
1.5 KiB
Plaintext
Raw Normal View History

snippet problem "template for problem notes" bi
2023-07-06 20:03:31 -04:00
#import "../templates/sfd.typ": template
#show: template.with(
problem_url: "$1",
title: "$2",
stat: "${3:incomplete}",
)
endsnippet
2023-07-06 20:03:31 -04:00
snippet sfd "template for lecture notes" bi
#import "../../templates/problems.typ": template, source_code, status
#show: template.with(
lecture_url: "$1",
title: "$2",
)
endsnippet
snippet contest "template for contest problems" bi
#import "../../templates/contest.typ": template, source_code, status
#show: template.with(
title: "$1",
stat: "${2:incomplete}",
)
endsnippet
2023-05-13 12:25:14 -04:00
snippet algs "template for compsci notes" bi
#import "../templates/algs.typ": template, source_code
#show: template.with(
title: "$1",
)
endsnippet
snippet math_prob "template for math problems" bi
#import "../../../templates/math_prob.typ": template
#show: template.with(
title: "$1",
)
endsnippet
2023-06-02 19:28:29 -04:00
snippet proj "template for project documents" bi
#import "../../templates/proj.typ": template
#show: template.with(
title: "$1",
)
endsnippet
snippet ss "superscript" i
^$1
endsnippet
snippet im "inline math" w
\$${1:${VISUAL}}\$
endsnippet
2023-06-12 15:32:58 -04:00
snippet mm "block math" w
\$ ${1:${VISUAL}} \$
endsnippet
2023-05-13 12:25:14 -04:00
snippet link "link" w
#link("${1}")[${2}]
endsnippet
snippet fig "create new figure" bi
#figure(
2023-04-22 16:09:28 -04:00
image("fig/`!v expand("%:r")`/$1.svg"),
caption: [$2],
2023-04-22 16:09:28 -04:00
) <$1>
endsnippet
2023-07-06 20:03:31 -04:00
snippet figp "create new image figure" bi
#figure(
image("fig/`!v expand("%:r")`/$1.jpg"),
caption: [$2],
) <$1>
endsnippet