can I use a snippet inside a snippet definition?

Asked by null

I would like to use a snippet inside a snippet definition.
For Example:

# javascript function
snippet fun "function (fun)"
function ${1:function_name} (${2:argument}) {
 ${0:// body...}
}
endsnippet

snippet def "reqiure.js define (js)" b
define(['${1:underscore}'], function(${2:_}) {
    #use javscript function snippet here somehow
    call_snippet fun
});
endsnippet

Question information

Language:
English Edit question
Status:
Answered
For:
UltiSnips Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
null (r-null-radix) said :
#1

I just found UltiSnips-globals. Which kinda solves the problem but I'm still curious if there is a way todo this without rewriting definitions to python.

Revision history for this message
SirVer (sirver) said :
#2

No, this is currently not supported. When you come up with a good syntax and/or implementation, just send me a pull request/patch or whetever :).

Can you help with this problem?

Provide an answer of your own, or ask null for more information if necessary.

To post a message you must log in.