Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.
Kim Gülle edited this page Jun 26, 2019 · 3 revisions

Contributions

Snippets

When you want to extend the RehQ plugin further by adding more snippets, a few things should be regarded.
All files with the ending .sublime-snippet (and in unit tests also .sublime-snippet.test) will be discovered by Sublime Text automatically (disregard their location).
In order for the snippets to be shown in the “Show available snippets” tooltip, the snippets have to be located in the (top level) Snippets folder. Furthermore, they have to be well formed with regards to some additional requirements.

Attributes

Required Attribute Used as
title heading in the available snippets overview
hint description in the available snippets overview
tabTrigger shorthand to type in sublime, which is used for the tab completion
scope limiter, to limit snippets to function in documents with the set scope (should always be `text.html.textile`)
description description in case that multiple snippets are available under the same trigger

You may have a look at an existing snippet to help you get started.
In order to test if your final snippets then satisfy these formal reuqirements, there also is a command available `RehQ > Development > Test snippets are all well formed`.
Note: In order for the command to check your custom snippets, you would have to put them in your local RehQ-Snippets folder (located in your computers Sublime Text user package location).

Naming

The following naming convention was introduced when adding snippets and it should be followed. Snippets name should have a description and the trigger included in the filename. Multiple words may be separated by underscores. The description and the trigger are separated by a “-” (hyphen char). A name would then look as follows useful_snippet-usfl.sublime-snippet, where useful_snippet is the description and usfl the trigger to type.

Clone this wiki locally