LogoLumide

Code Snippets

Snippets expand boilerplate code templates with interactive tab-stops.


Expanding Snippets#

  1. Type the trigger prefix (e.g. stless, for, try) in the editor.
  2. Select the snippet from the completion list and press Tab or Enter.
  3. The snippet body inserts and focuses the first placeholder ($1).

Tab-Stop Navigation#

KeyAction
Tab Move to next placeholder ($2, $3...)
Shift + TabMove to previous placeholder
Escape Cancel snippet session and restore normal cursor

Navigating past the final placeholder ($0) automatically exits snippet mode.


Placeholder Features#

  • Default Values: ${1:initialValue} fills the placeholder with editable default text.
  • Mirrored Stops: Multiple occurrences of the same index (e.g., ${1:WidgetName}) update simultaneously as you type in one.
  • Choice Lists: ${1|optionA,optionB,optionC|} opens a dropdown list of choices on that tab stop.
  • Dynamic Variables:
    • $TM_FILENAME: File name with extension.
    • $TM_FILENAME_BASE: File name without extension.
    • $CURRENT_YEAR: 4-digit current year.
    • $CLIPBOARD: Contents of the system clipboard.

Built-in Flutter / Dart Snippets#

  • stless: Generates a StatelessWidget.
  • stful: Generates a StatefulWidget and State class.
  • builder: Generates a Builder widget.

Next Steps#