Espresso

CETextSnippet

CETextSnippet objects allow you to compile snippets from strings using snippet syntax into snippets that can be inserted via the TextActionContext object.

CETextSnippet(snippet)

The CETextSnippet constructor accepts a snippet as a string argument:

var snippet = new CETextSnippet('<${1:p}>$0</$1>');
context.insertTextSnippet(snippet);