Snippets
Reusable wording: insert a snippet, accept one suggested while you type, or save blocks as a snippet.
A snippet is a short piece of wording you use again and again, such as a standard warning or a sentence about the warranty. Snippets are modules of a type your project marks as a snippet type.
Insert a snippet
- Put the caret where the snippet should go.
- Choose Insert, then Snippet. Or type
/snippetand press Enter. - In Insert snippet, type in Search snippets and choose one.
- Choose how to insert it:
- As reference: kept in sync. A change to the snippet shows everywhere it is used, and it is translated once.
- As copy: its text is copied here, and you can change it freely. Nothing links back to the snippet.
- Choose Insert.
Accept a suggested snippet
While you type, the editor watches for the start of a snippet's wording. When it finds one, it shows the rest of the snippet in grey after the caret.
- Tab inserts it as a reference.
- Shift Tab inserts it as a copy.
- Esc dismisses it. Or just type on.
Save blocks as a snippet
- Select the blocks: one, or a few paragraphs or a list. A snippet holds no headings and no module references.
- Choose Save as snippet in the toolbar that appears over the selection. For a single block, the block actions menu (the grip to the left) has it too.
- Enter a Title. The ID is made from it.
- Choose the Snippet type if your project has more than one.
- Choose Save snippet.
The snippet is saved in your revision, and a reference to it takes the place of the blocks.