You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MotionCode Dev edited this page Jun 29, 2026
·
1 revision
Welcome!
This is a quick guide on how to register your templates (placeholders for empty files) in your extension
Get started
First, you need to add the following key to your package.json:
"templates.register": "templates/config"
Here is the path to your config file. The path is absolute, but in this example, it points to the templates folder inside the extension folder, where the config.json file is located.
Next, let's look at a minimal example of the config file's contents:
In this example, the template will be available when you open a .slim file (only the last word after the period is taken into account, meaning that a file named index.xxx.slim will also be a .slim file). As you can see, you can use \t and \n for line breaks or tabs, which will work perfectly in the editor.
Let’s break down the fields:
name - The template’s name; it will appear in the list
content - The content that will be inserted into the editor when clicked