Skip to content

symbols

The community/plugin/symbols directory manages voice commands for entering common symbols, punctuation combinations, and delimiter pairs (such as parentheses, brackets, and quotes). It serves as an interface layer that maps spoken voice triggers to editor actions, offering both modern standardized commands and a clear migration path for legacy vocabulary.

The directory consists of two main files:

  • symbols.talon — Defines the current active voice commands for symbol insertion and matching delimiter manipulation.
  • symbols_deprecated.talon — Maintained for backwards compatibility, this file flags outdated spoken terms and guides users toward the preferred modern syntax.

Core Symbol Insertion and Wrapping

The primary syntax for entering symbol combinations is defined in symbols.talon. It exposes several fast-paths for multi-character sequences, such as:

  • Punctuation Shorthands: Fast-path macros like comma and (which inserts ,), arrow (->), dub arrow (=>), and ellipsis (...).
  • Delimiter Insertion: The list capture <user.delimiter_pair> is matched to insert structural pairs (e.g., parenthetical units, curly brackets, quotes) and automatically positions the cursor inside them via the user.delimiter_pair_insert action.
  • Selection Wrapping: Appending the word "that" to a delimiter pair trigger (e.g., <user.delimiter_pair> that) invokes user.delimiter_pair_wrap_selection to wrap the currently highlighted editor selection within the designated characters.

Deprecation and Migration Support

To ensure a smooth transition as the community voice vocabulary evolves, symbols_deprecated.talon maps older, legacy commands to their modern equivalents.

Instead of breaking workflow habits immediately, commands in this file:

  1. Notify the user of the preferred modern term using the user.deprecate_command action (for example, warning that inside parens should now be spoken as round).
  2. Execute the requested legacy action so that typing productivity is not interrupted.

This approach manages the lifecycle of physical symbol mapping commands safely while promoting vocabulary standardization across the community.