Snippets — text templates
English | Українська
Open Settings → Snippets…. A snippet replaces a short trigger with a greeting, signature, repeated reply or checklist. Replacement text can contain multiple lines and a caret-position marker.
- Click Add to create an entry, then enter a Trigger, such as
;hello. - Enter Replacement text, including line breaks.
- Click Save in the snippets window to apply your changes.
- Type the trigger into a text field. Expansion happens when the full trigger is typed; no additional Space is needed.
Select an existing entry to edit it; Delete removes the selected snippet. Triggers are recognized across keyboard layouts, so you do not need to switch language just to invoke one.
Example: ;run → rider .{enter} (insert text and press Enter).
Examples
;hello
Hello, {cursor}!
Thank you for your message.
;thanks
Thank you for your help!
Best regards,
Demo User
;check
Release checklist
- Build
- Run tests
- Publish
{cursor} is not inserted literally: the caret moves to that marker. In the greeting, it lands after the comma and space, ready for a name. Use {{cursor}} to insert the literal text {cursor}.
Choose distinctive triggers with a prefix such as ; to avoid expanding templates during ordinary typing.
Enter actions and continuous typing
Use {enter} to press Enter after insertion and cursor placement, once for each marker. For example, rider .{enter} inserts rider . and then presses Enter. {{enter}} inserts the literal marker. Enter may submit a message or command in the target application; a line break written in the replacement is plain multiline text instead.
Typing immediately after a trigger is buffered and replayed after expansion. Automatic correction is suppressed for the expansion and its buffered typing; the global setting stays enabled for subsequent input. Since v0.6.17, the trigger/replacement fields, Delete and marker buttons are disabled until an entry is selected or added. Deleting the selected entry clears and disables the editor.
Copy failures (v0.6.19)
Before replacing a trigger, KSwitcher copies and verifies the selected text. If Ctrl+C produces no clipboard change, it can try again, up to three total attempts, provided the active input context and transaction clipboard have not changed. If the trigger still cannot be verified, expansion is cancelled: the trigger remains, queued typing resumes, and no {enter} action is sent. Paste is not blindly retried.
{enter} is a key action, not a promise of a newline: a multiline editor normally inserts a line break, a single-line field may ignore it, and a chat or terminal may submit the text. No snippet syntax, shortcut or default changed in this patch.
Synchronization (v0.6.26)
Snippets retain stable IDs across renames. Independent edits merge; deletion records prevent unchanged offline copies from restoring removed snippets. Deletion versus editing and duplicate triggers are resolved per item under Sync… → Resolve individual conflicts…. Existing snippets migrate automatically; update all PCs for sync format 2. Setup and recovery.
Editor access keys (v0.6.27)
Alt+A adds, Alt+D deletes, Alt+T focuses Trigger, Alt+R focuses Replacement text, Alt+M inserts the cursor marker, Alt+E inserts the Enter marker, Alt+S saves and Alt+C cancels. Disabled actions remain unavailable. See access keys.