Skip to main content

Module: actions/GenerateSnippet/constructSnippetBody

Functions

constructSnippetBody

constructSnippetBody(text, linePrefix): string[]

Converts a range of text in an editor into a snippet body representation as expected by textmate.

Note that if you want tabstops, you must first modify {@link text} to contain the tabstops.

Parameters

NameTypeDescription
textstringThe text to use for the snippet body
linePrefixstringThe text on the line that the snippet starts on leading to the start of the snippet. This is used for determining indentation

Returns

string[]

The body of a snippet represented as a list of lines as expected for textmate snippets

Defined in

actions/GenerateSnippet/constructSnippetBody.ts:32