Logo Text Blaze

  • Docs
  • Community
  • Documentation

    Loading...

    Community Forums

    Loading...
Add to Chrome –  It's Free! Go to Dashboard ›
Commands

{snippet}

Summary: Inserts information about the current snippet in the snippet itself
Sample Usage
The snippet's shortcut is <{snippet: shortcut}>.
_

Settings


Setting NameTypeDescription
PositionaltextThe snippet property to get
General Command Settings
trimyes/no/left/rightIf yes whitespace is removed before and after the command. If left, only whitespace to the left is removed. If right, only whitespace to the right is removed.

The {snippet} command allows you to include information about the snippet itself within the snippet.

If you're looking to import another snippet into your current snippet, that would be the {import} command.

The {snippet} command takes a single positional setting that supports three different values.

PropertyDescriptionExample
idThe snippet's id.xyz987
shortcutThe snippet's shortcut./example
triggerThe snippet's shortcut as it was typed to trigger the insertion./Example

Capitalization is important. Each property must be typed in lowercase into the command. For example, {snippet: id} will work, but {snippet: ID} will not.

The id is a unique identifier for the snippet set automatically when the snippet is created. It will not change even if the snippet's name or shortcut is changed.

Using the {snippet} command and the {import} command together

The {snippet} command will always refer to the snippet that was initially triggered by the user even if the command is nested within an imported snippet.

This means that if the {snippet} command is used within an {import} command, the {snippet} command will still refer to the initial snippet that was triggered, not the snippet being imported with the {import} command.

Case-sensitive insertion

{snippet: trigger} will return the shortcut exactly as it was typed including capitalization. This can be used to implement case-sensitive replacements.

For example, the following will insert the text "inserted text" while matching the capitalization of the shortcut. For example, if the shortcut was "/go" and you typed "/GO" it would insert "INSERTED TEXT". On the other hand, if you typed "/Go", it would insert "Inserted Text".

Case-sensitive insertion
{if: {snippet: trigger} == upper({snippet: trigger}); trim=yes} INSERTED TEXT {elseif: {snippet: trigger} == lower({snippet: trigger}); trim=yes} inserted text {else: trim=yes} Inserted Text {endif: trim=yes}
_

See the {if} command for more information on using conditional logic in your snippets.

upper() is a predefined function available to you in Text Blaze. See the Blaze Formula Language Reference for more information on the various predefined functions available to you.

  • Guides
    • Quick Start
    • Sharing Snippet Folders
    • Dynamic Commands
    • Date and Time
    • Autopilot
    • Forms
    • Tidying Whitespace
    • Lists
    • Teams and Organizations
  • Tutorial Videos
  • Showcase
  • Frequently Asked Questions
  • Formula Reference
  • Dynamic Commands
    • Using Dynamic Commands
    • {=} (Formula Command)
    • {click}
    • {clipboard}
    • {cursor}
    • {error}
    • {formdate}
    • {formmenu}
    • {formparagraph}
    • {formtext}
    • {formtoggle}
    • {if}
    • {import}
    • {key}
    • {link}
    • {note}
    • {repeat}
    • {site}
    • {snippet}
    • {time}
    • {user}
    • {wait}
  • Connected Snippets
    • Connected Snippets Overview
    • {image}
    • {urlload}
    • {urlsend}
    • {dbselect}
    • {dbinsert}
    • {dbupdate}
    • {dbdelete}
  • Command Packs
    • Capitalize
    • Gmail
    • LinkedIn
    • Randomize

About

Plans and Pricing
Sharing Snippets
Text Blaze for Business
Forms
Autopilot
Dynamic Commands
Command Packs

Support

Get Started with Text Blaze
Contact Us
Documentation
Community Forum
Blog

Solution for

Teams
Customer Support
Recruiters
Education
Healthcare
Sales
Property Managers

Other

Privacy Policy
Terms of Service
Open Source Licenses
Affiliate
© 2023 Blaze Today Inc