Snippets (Part 4)

Let’s wrap up custom user snippet support in TKE by talking about snippet transforms. Transforms allow the snippet writer to make adjustments to text added at tabstops in mirrored tabstops or adjustments to snippet variables. Transformations have the following syntax in snippet text:

${tabstop/regexp/format/opts}  OR
${variable/regexp/format/opts}

Continue reading “Snippets (Part 4)”

Advertisements
Snippets (Part 4)

Snippets (Part 2)

In this article, we are going to look at TKE’s support for customized snippets that can be accessible from either any editing buffer (called “user snippets”) or from editing buffers of a specific language (called “language-specific snippets”). Because these snippets are custom made by the user, the snippet text can be anything you like and the trigger (the keyword that you input that is replaced with the snippet text) can also be any string that you like so long as each custom snippet has a unique trigger keyword associated with it.

First, let’s take a quick look at how to use a snippet.

Continue reading “Snippets (Part 2)”

Snippets (Part 2)