Skip to main content

Insert Snippet and Variable

Insert Snippet · Insert Variable

Productivity ⚡ tab → Snippets group

Search-driven pickers for inserting snippets and variables at the cursor — faster than browsing the Content Explorer when you know roughly what you are looking for.

Insert a snippet​

  1. Place the cursor in an open topic where the snippet should go.
  2. Click Insert Snippet.
  3. Type at least two characters — snippets are matched on file name or file content (case-insensitive). The pane on the right previews the selected snippet.
  4. Press Enter (or double-click) to insert.
  5. If the snippet could be inserted either way, choose Block (own paragraph) or Inline (within text):
    • Block inserts a MadCap:snippetBlock — replacing the current element if it is empty, otherwise right after it.
    • Inline splices a MadCap:snippetText into the text at the cursor.
    • Snippets with several top-level blocks are always inserted as block.

Insert a variable​

  1. Place the cursor in an open topic.
  2. Click Insert Variable.
  3. Type to search all variable sets by name or value; the preview shows the definition.
  4. Press Enter (or double-click) — a MadCap:variable element is inserted at the cursor.

Keyboard flow​

Both pickers are built for hands-on-keyboard use: type to search, press Down to move into the result list, Enter to insert, Up from the first row to return to the search box.

Notes​

  • The topic is saved before insertion (which also triggers source-control check-out); use Flare's normal undo afterwards if needed.
  • Snippet paths are inserted relative to the topic, so the reference stays correct wherever the topic lives.