# context for multiple snippets

I have a function that determines whether I am in a mathmatical context within latex, using ultisnips. I want to this to be applied to many snippets at once.

context "math()"
snippet fun "function" iA
${1:f} :$2 \R \to \R
endsnippet

context "math()"
snippet ff "function at x" iA
${1:f}(${2:x})$0 endsnippet context "math()" snippet fog "function composition" i${1:f} \circ ${2:g}$0
endsnippet


Right now my horrible solution is to add this context above each snippet, is there a better way?

• No worries, I changed my image to a code block now. – cuppajoeman Jun 11 '19 at 15:11