From b1d5d5cd04691ca55eb2dc2fafb81042b7fe7a82 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 29 Aug 2026 11:56:56 +0200 Subject: [PATCH 1/4] Added examples to all reference definitions --- packages/app-web-docs/src/css/custom.scss | 5 - .../src/docs/user/actions/addSelection.mdx | 4 + .../docs/user/actions/addSelectionAfter.mdx | 4 + .../docs/user/actions/addSelectionBefore.mdx | 4 + .../src/docs/user/actions/applyFormatter.mdx | 4 + .../src/docs/user/actions/breakLine.mdx | 4 + .../src/docs/user/actions/callAsFunction.mdx | 4 + .../user/actions/clearAndSetSelection.mdx | 4 + .../src/docs/user/actions/copyToClipboard.mdx | 4 + .../src/docs/user/actions/cutToClipboard.mdx | 4 + .../src/docs/user/actions/decrement.mdx | 4 + .../src/docs/user/actions/deselect.mdx | 4 + .../docs/user/actions/editNewLineAfter.mdx | 5 + .../docs/user/actions/editNewLineBefore.mdx | 5 + .../src/docs/user/actions/extractVariable.mdx | 4 + .../src/docs/user/actions/findInDocument.mdx | 4 + .../src/docs/user/actions/findInWorkspace.mdx | 4 + .../src/docs/user/actions/flashTargets.mdx | 4 + .../src/docs/user/actions/foldRegion.mdx | 4 + .../src/docs/user/actions/followLink.mdx | 4 + .../src/docs/user/actions/followLinkAside.mdx | 4 + .../src/docs/user/actions/generateSnippet.mdx | 4 + .../src/docs/user/actions/gitAccept.mdx | 4 + .../src/docs/user/actions/gitRevert.mdx | 4 + .../src/docs/user/actions/gitStage.mdx | 4 + .../src/docs/user/actions/gitUnstage.mdx | 4 + .../src/docs/user/actions/highlight.mdx | 4 + .../src/docs/user/actions/increment.mdx | 4 + .../src/docs/user/actions/indentLine.mdx | 4 + .../src/docs/user/actions/insertCopyAfter.mdx | 4 + .../docs/user/actions/insertCopyBefore.mdx | 4 + .../user/actions/insertEmptyLineAfter.mdx | 5 + .../user/actions/insertEmptyLineBefore.mdx | 5 + .../user/actions/insertEmptyLinesAround.mdx | 5 + .../src/docs/user/actions/insertSnippet.mdx | 4 + .../src/docs/user/actions/joinLines.mdx | 4 + .../src/docs/user/actions/moveToTarget.mdx | 4 + .../src/docs/user/actions/nextHomophone.mdx | 4 + .../src/docs/user/actions/outdentLine.mdx | 4 + .../docs/user/actions/pasteFromClipboard.mdx | 4 + .../docs/user/actions/randomizeTargets.mdx | 4 + .../src/docs/user/actions/rename.mdx | 4 + .../docs/user/actions/replaceWithTarget.mdx | 4 + .../docs/user/actions/revealDefinition.mdx | 4 + .../user/actions/revealTypeDefinition.mdx | 4 + .../src/docs/user/actions/reverseTargets.mdx | 4 + .../actions/rewrapWithPairedDelimiter.mdx | 4 + .../src/docs/user/actions/scrollToBottom.mdx | 4 + .../src/docs/user/actions/scrollToCenter.mdx | 4 + .../src/docs/user/actions/scrollToTop.mdx | 4 + .../user/actions/setInstanceReference.mdx | 4 + .../src/docs/user/actions/setSelection.mdx | 4 + .../docs/user/actions/setSelectionAfter.mdx | 4 + .../docs/user/actions/setSelectionBefore.mdx | 4 + .../src/docs/user/actions/showDebugHover.mdx | 4 + .../src/docs/user/actions/showHover.mdx | 4 + .../src/docs/user/actions/showQuickFix.mdx | 4 + .../src/docs/user/actions/showReferences.mdx | 4 + .../src/docs/user/actions/sortTargets.mdx | 4 + .../src/docs/user/actions/swapTargets.mdx | 4 + .../user/actions/toggleLineBreakpoint.mdx | 4 + .../docs/user/actions/toggleLineComment.mdx | 4 + .../src/docs/user/actions/unfoldRegion.mdx | 4 + .../user/actions/wrapWithPairedDelimiter.mdx | 4 + .../src/docs/user/actions/wrapWithSnippet.mdx | 4 + .../src/docs/user/modifiers/ancestor.mdx | 4 + .../docs/user/modifiers/containingScope.mdx | 4 + .../src/docs/user/modifiers/endOf.mdx | 4 + .../src/docs/user/modifiers/everyScope.mdx | 4 + .../docs/user/modifiers/excludeInterior.mdx | 4 + .../user/modifiers/extendThroughEndOf.mdx | 4 + .../user/modifiers/extendThroughStartOf.mdx | 4 + .../docs/user/modifiers/inferPreviousMark.mdx | 4 + .../src/docs/user/modifiers/interiorOnly.mdx | 4 + .../docs/user/modifiers/keepContentFilter.mdx | 4 + .../docs/user/modifiers/keepEmptyFilter.mdx | 4 + .../src/docs/user/modifiers/leading.mdx | 4 + .../src/docs/user/modifiers/ordinalScope.mdx | 5 + .../src/docs/user/modifiers/relativeScope.mdx | 5 + .../src/docs/user/modifiers/startOf.mdx | 4 + .../docs/user/modifiers/toRawSelection.mdx | 4 + .../src/docs/user/modifiers/trailing.mdx | 4 + .../src/docs/user/modifiers/visible.mdx | 4 + .../docs/user/scopes/anonymousFunction.mdx | 4 + .../src/docs/user/scopes/argumentList.mdx | 4 + .../docs/user/scopes/argumentOrParameter.mdx | 4 + .../src/docs/user/scopes/attribute.mdx | 4 + .../scopes/boundedNonWhitespaceSequence.mdx | 4 + .../src/docs/user/scopes/boundedParagraph.mdx | 4 + .../src/docs/user/scopes/branch.mdx | 4 + .../src/docs/user/scopes/chapter.mdx | 4 + .../src/docs/user/scopes/character.mdx | 4 + .../src/docs/user/scopes/class.mdx | 4 + .../src/docs/user/scopes/className.mdx | 4 + .../src/docs/user/scopes/collectionItem.mdx | 4 + .../src/docs/user/scopes/collectionKey.mdx | 4 + .../src/docs/user/scopes/command.mdx | 4 + .../src/docs/user/scopes/comment.mdx | 4 + .../src/docs/user/scopes/condition.mdx | 4 + .../src/docs/user/scopes/document.mdx | 4 + .../src/docs/user/scopes/environment.mdx | 4 + .../src/docs/user/scopes/fullLine.mdx | 4 + .../src/docs/user/scopes/functionCall.mdx | 4 + .../src/docs/user/scopes/functionCallee.mdx | 4 + .../src/docs/user/scopes/functionName.mdx | 4 + .../src/docs/user/scopes/glyph.mdx | 4 + .../src/docs/user/scopes/identifier.mdx | 4 + .../src/docs/user/scopes/ifStatement.mdx | 4 + .../src/docs/user/scopes/instance.mdx | 4 + .../src/docs/user/scopes/line.mdx | 4 + .../src/docs/user/scopes/list.mdx | 4 + .../app-web-docs/src/docs/user/scopes/map.mdx | 4 + .../src/docs/user/scopes/name.mdx | 4 + .../src/docs/user/scopes/namedFunction.mdx | 4 + .../src/docs/user/scopes/namedParagraph.mdx | 4 + .../user/scopes/nonWhitespaceSequence.mdx | 4 + .../src/docs/user/scopes/notebookCell.mdx | 4 + .../src/docs/user/scopes/paragraph.mdx | 4 + .../src/docs/user/scopes/part.mdx | 4 + .../docs/user/scopes/regularExpression.mdx | 4 + .../src/docs/user/scopes/section.mdx | 4 + .../src/docs/user/scopes/sectionLevelFive.mdx | 4 + .../src/docs/user/scopes/sectionLevelFour.mdx | 4 + .../src/docs/user/scopes/sectionLevelOne.mdx | 4 + .../src/docs/user/scopes/sectionLevelSix.mdx | 4 + .../docs/user/scopes/sectionLevelThree.mdx | 4 + .../src/docs/user/scopes/sectionLevelTwo.mdx | 4 + .../src/docs/user/scopes/selector.mdx | 4 + .../src/docs/user/scopes/sentence.mdx | 4 + .../src/docs/user/scopes/statement.mdx | 4 + .../src/docs/user/scopes/subParagraph.mdx | 4 + .../src/docs/user/scopes/subSection.mdx | 4 + .../src/docs/user/scopes/subSubSection.mdx | 4 + .../src/docs/user/scopes/surroundingPair.mdx | 4 + .../src/docs/user/scopes/token.mdx | 4 + .../src/docs/user/scopes/type.mdx | 4 + .../src/docs/user/scopes/unit.mdx | 4 + .../app-web-docs/src/docs/user/scopes/url.mdx | 4 + .../src/docs/user/scopes/value.mdx | 4 + .../src/docs/user/scopes/word.mdx | 4 + .../src/docs/user/scopes/xmlBothTags.mdx | 4 + .../src/docs/user/scopes/xmlElement.mdx | 4 + .../src/docs/user/scopes/xmlEndTag.mdx | 4 + .../src/docs/user/scopes/xmlStartTag.mdx | 4 + .../src/references/actionReferences.ts | 506 +++++++++++++++--- .../lib-common/src/references/constants.ts | 39 ++ .../src/references/modifierReferences.ts | 190 +++++-- .../src/references/scopeReferences.ts | 487 ++++++++++++++--- .../lib-common/src/references/variables.ts | 13 - 149 files changed, 1615 insertions(+), 204 deletions(-) create mode 100644 packages/lib-common/src/references/constants.ts delete mode 100644 packages/lib-common/src/references/variables.ts diff --git a/packages/app-web-docs/src/css/custom.scss b/packages/app-web-docs/src/css/custom.scss index 45876a2b0db..b7168287c5e 100644 --- a/packages/app-web-docs/src/css/custom.scss +++ b/packages/app-web-docs/src/css/custom.scss @@ -25,8 +25,3 @@ .pointer { cursor: pointer; } - -.list-unstyled { - padding-left: 1rem; - list-style: none; -} diff --git a/packages/app-web-docs/src/docs/user/actions/addSelection.mdx b/packages/app-web-docs/src/docs/user/actions/addSelection.mdx index 2ef5495c62e..4955300700c 100644 --- a/packages/app-web-docs/src/docs/user/actions/addSelection.mdx +++ b/packages/app-web-docs/src/docs/user/actions/addSelection.mdx @@ -9,3 +9,7 @@ Default: `append` ## Syntax - append ``: Adds `` to the current selection set. + +## Examples + +- `"append blue air"`: Adds the token containing letter 'a' with a blue hat to the current selections. diff --git a/packages/app-web-docs/src/docs/user/actions/addSelectionAfter.mdx b/packages/app-web-docs/src/docs/user/actions/addSelectionAfter.mdx index 091b51f8fb2..648bd030fa8 100644 --- a/packages/app-web-docs/src/docs/user/actions/addSelectionAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/addSelectionAfter.mdx @@ -9,3 +9,7 @@ Default: `append post` ## Syntax - append post ``: Adds empty selection after `` to the current selection set. + +## Examples + +- `"append post blue air"`: Adds an empty selection after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/addSelectionBefore.mdx b/packages/app-web-docs/src/docs/user/actions/addSelectionBefore.mdx index 5e172dc0d23..c4a72ff5a20 100644 --- a/packages/app-web-docs/src/docs/user/actions/addSelectionBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/addSelectionBefore.mdx @@ -9,3 +9,7 @@ Default: `append pre` ## Syntax - append pre ``: Adds empty selection before `` to the current selection set. + +## Examples + +- `"append pre blue air"`: Adds an empty selection before the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/applyFormatter.mdx b/packages/app-web-docs/src/docs/user/actions/applyFormatter.mdx index eaa31b399e0..d11ebe9d605 100644 --- a/packages/app-web-docs/src/docs/user/actions/applyFormatter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/applyFormatter.mdx @@ -9,3 +9,7 @@ Default: `format` ## Syntax - format `` at ``: Reformat `` as ``. + +## Examples + +- `"format camel at blue air"`: Reformats the token containing letter 'a' with a blue hat as camel case. diff --git a/packages/app-web-docs/src/docs/user/actions/breakLine.mdx b/packages/app-web-docs/src/docs/user/actions/breakLine.mdx index 14e970b1777..ea5025703f8 100644 --- a/packages/app-web-docs/src/docs/user/actions/breakLine.mdx +++ b/packages/app-web-docs/src/docs/user/actions/breakLine.mdx @@ -9,3 +9,7 @@ Default: `break` ## Syntax - break ``: Breaks the line before ``. + +## Examples + +- `"break blue air"`: Breaks the line before the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/callAsFunction.mdx b/packages/app-web-docs/src/docs/user/actions/callAsFunction.mdx index ad44ceedaca..f4118d91291 100644 --- a/packages/app-web-docs/src/docs/user/actions/callAsFunction.mdx +++ b/packages/app-web-docs/src/docs/user/actions/callAsFunction.mdx @@ -10,3 +10,7 @@ Default: `call` - call ``: Insert call to `` on selection. - call `` on ``: Insert call to `` on ``. + +## Examples + +- `"call blue air"`: Inserts a call to the token containing letter 'a' with a blue hat at the current selection. diff --git a/packages/app-web-docs/src/docs/user/actions/clearAndSetSelection.mdx b/packages/app-web-docs/src/docs/user/actions/clearAndSetSelection.mdx index 6a58fc92420..a48ba64bf35 100644 --- a/packages/app-web-docs/src/docs/user/actions/clearAndSetSelection.mdx +++ b/packages/app-web-docs/src/docs/user/actions/clearAndSetSelection.mdx @@ -10,3 +10,7 @@ Legacy: `clear` ## Syntax - change ``: Change `` by clearing it and leaving the cursor in its place. + +## Examples + +- `"change blue air"`: Deletes the token containing letter 'a' with a blue hat and leaves the cursor in its place. diff --git a/packages/app-web-docs/src/docs/user/actions/copyToClipboard.mdx b/packages/app-web-docs/src/docs/user/actions/copyToClipboard.mdx index 7ed55fd5156..2fab67a9ea7 100644 --- a/packages/app-web-docs/src/docs/user/actions/copyToClipboard.mdx +++ b/packages/app-web-docs/src/docs/user/actions/copyToClipboard.mdx @@ -9,3 +9,7 @@ Default: `copy` ## Syntax - copy ``: Copy `` to clipboard. + +## Examples + +- `"copy blue air"`: Copies the token containing letter 'a' with a blue hat to the clipboard. diff --git a/packages/app-web-docs/src/docs/user/actions/cutToClipboard.mdx b/packages/app-web-docs/src/docs/user/actions/cutToClipboard.mdx index f07c6a76cb1..2ef9b4ffbf2 100644 --- a/packages/app-web-docs/src/docs/user/actions/cutToClipboard.mdx +++ b/packages/app-web-docs/src/docs/user/actions/cutToClipboard.mdx @@ -9,3 +9,7 @@ Default: `carve` ## Syntax - carve ``: Cut `` to clipboard. + +## Examples + +- `"carve blue air"`: Cuts the token containing letter 'a' with a blue hat to the clipboard. diff --git a/packages/app-web-docs/src/docs/user/actions/decrement.mdx b/packages/app-web-docs/src/docs/user/actions/decrement.mdx index 94bd0ebc64d..c337fdcc800 100644 --- a/packages/app-web-docs/src/docs/user/actions/decrement.mdx +++ b/packages/app-web-docs/src/docs/user/actions/decrement.mdx @@ -9,3 +9,7 @@ Default: `decrement` ## Syntax - decrement ``: Decrement number at ``. + +## Examples + +- `"decrement blue air"`: Decrements the number at the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/deselect.mdx b/packages/app-web-docs/src/docs/user/actions/deselect.mdx index 4893b2d597e..a81e7306a38 100644 --- a/packages/app-web-docs/src/docs/user/actions/deselect.mdx +++ b/packages/app-web-docs/src/docs/user/actions/deselect.mdx @@ -9,3 +9,7 @@ Default: `give` ## Syntax - give ``: Deselect ``. + +## Examples + +- `"give blue air"`: Removes the token containing letter 'a' with a blue hat from the current selections. diff --git a/packages/app-web-docs/src/docs/user/actions/editNewLineAfter.mdx b/packages/app-web-docs/src/docs/user/actions/editNewLineAfter.mdx index 1c7e3550f76..023b43157dd 100644 --- a/packages/app-web-docs/src/docs/user/actions/editNewLineAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/editNewLineAfter.mdx @@ -12,3 +12,8 @@ Default: `pour` - pour ``: Edit new line after ``. - pour `` ``: Edit new `` after ``. + +## Examples + +- `"pour blue air"`: Inserts a new line below the token containing letter 'a' with a blue hat and moves the cursor to it. +- `"pour item blue air"`: Inserts the delimiters for a new collection item after the item containing the token containing letter 'a' with a blue hat and moves the cursor there. diff --git a/packages/app-web-docs/src/docs/user/actions/editNewLineBefore.mdx b/packages/app-web-docs/src/docs/user/actions/editNewLineBefore.mdx index 8f75f65a372..bab048030d2 100644 --- a/packages/app-web-docs/src/docs/user/actions/editNewLineBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/editNewLineBefore.mdx @@ -12,3 +12,8 @@ Default: `drink` - drink ``: Edit new line before ``. - drink `` ``: Edit new `` before ``. + +## Examples + +- `"drink blue air"`: Inserts a new line above the token containing letter 'a' with a blue hat and moves the cursor to it. +- `"drink item blue air"`: Inserts the delimiters for a new collection item before the item containing the token containing letter 'a' with a blue hat and moves the cursor there. diff --git a/packages/app-web-docs/src/docs/user/actions/extractVariable.mdx b/packages/app-web-docs/src/docs/user/actions/extractVariable.mdx index fbbb8dcabfd..79dd3f6014d 100644 --- a/packages/app-web-docs/src/docs/user/actions/extractVariable.mdx +++ b/packages/app-web-docs/src/docs/user/actions/extractVariable.mdx @@ -9,3 +9,7 @@ Default: `extract` ## Syntax - extract ``: Extract variable from ``. + +## Examples + +- `"extract call blue air"`: Extracts the function call containing the token containing letter 'a' with a blue hat into a variable. diff --git a/packages/app-web-docs/src/docs/user/actions/findInDocument.mdx b/packages/app-web-docs/src/docs/user/actions/findInDocument.mdx index 5fa853c7835..19a6023012b 100644 --- a/packages/app-web-docs/src/docs/user/actions/findInDocument.mdx +++ b/packages/app-web-docs/src/docs/user/actions/findInDocument.mdx @@ -9,3 +9,7 @@ Default: `scout` ## Syntax - scout ``: Find `` in document. + +## Examples + +- `"scout blue air"`: Searches the current document for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/findInWorkspace.mdx b/packages/app-web-docs/src/docs/user/actions/findInWorkspace.mdx index 2a9948cb68c..0e6fb42c366 100644 --- a/packages/app-web-docs/src/docs/user/actions/findInWorkspace.mdx +++ b/packages/app-web-docs/src/docs/user/actions/findInWorkspace.mdx @@ -9,3 +9,7 @@ Default: `scout all` ## Syntax - scout all ``: Find `` in workspace. + +## Examples + +- `"scout all blue air"`: Searches the workspace for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/flashTargets.mdx b/packages/app-web-docs/src/docs/user/actions/flashTargets.mdx index 5d31ef21231..3a9452ec5df 100644 --- a/packages/app-web-docs/src/docs/user/actions/flashTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/flashTargets.mdx @@ -9,3 +9,7 @@ Default: `flash` ## Syntax - flash ``: Flash ``. + +## Examples + +- `"flash blue air"`: Briefly flashes the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/foldRegion.mdx b/packages/app-web-docs/src/docs/user/actions/foldRegion.mdx index d5530033318..e134b331f92 100644 --- a/packages/app-web-docs/src/docs/user/actions/foldRegion.mdx +++ b/packages/app-web-docs/src/docs/user/actions/foldRegion.mdx @@ -9,3 +9,7 @@ Default: `fold` ## Syntax - fold ``: Fold region at ``. + +## Examples + +- `"fold funk blue air"`: Folds the function containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/followLink.mdx b/packages/app-web-docs/src/docs/user/actions/followLink.mdx index 30ff29d1a54..f50c100bc79 100644 --- a/packages/app-web-docs/src/docs/user/actions/followLink.mdx +++ b/packages/app-web-docs/src/docs/user/actions/followLink.mdx @@ -9,3 +9,7 @@ Default: `follow` ## Syntax - follow ``: Follow link at ``. + +## Examples + +- `"follow blue air"`: Opens the link containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/followLinkAside.mdx b/packages/app-web-docs/src/docs/user/actions/followLinkAside.mdx index 52517997f1c..5fee9a0eca3 100644 --- a/packages/app-web-docs/src/docs/user/actions/followLinkAside.mdx +++ b/packages/app-web-docs/src/docs/user/actions/followLinkAside.mdx @@ -9,3 +9,7 @@ Default: `follow split` ## Syntax - follow split ``: Follow link at `` aside (e.g. in a split view). + +## Examples + +- `"follow split blue air"`: Opens the link containing the token containing letter 'a' with a blue hat in a split view. diff --git a/packages/app-web-docs/src/docs/user/actions/generateSnippet.mdx b/packages/app-web-docs/src/docs/user/actions/generateSnippet.mdx index 2fbbc643249..57f7d45d2ce 100644 --- a/packages/app-web-docs/src/docs/user/actions/generateSnippet.mdx +++ b/packages/app-web-docs/src/docs/user/actions/generateSnippet.mdx @@ -10,3 +10,7 @@ Legacy: `snippet make` ## Syntax - snip make ``: Generate snippet from ``. + +## Examples + +- `"snip make funk blue air"`: Generates a snippet from the function containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/gitAccept.mdx b/packages/app-web-docs/src/docs/user/actions/gitAccept.mdx index f4332d73e0f..645d0a71fed 100644 --- a/packages/app-web-docs/src/docs/user/actions/gitAccept.mdx +++ b/packages/app-web-docs/src/docs/user/actions/gitAccept.mdx @@ -9,3 +9,7 @@ Default: `git accept` ## Syntax - git accept ``: Accept Git change at ``. + +## Examples + +- `"git accept blue air"`: Accepts the Git change on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/gitRevert.mdx b/packages/app-web-docs/src/docs/user/actions/gitRevert.mdx index f36385c572a..a3d85b5c2b2 100644 --- a/packages/app-web-docs/src/docs/user/actions/gitRevert.mdx +++ b/packages/app-web-docs/src/docs/user/actions/gitRevert.mdx @@ -9,3 +9,7 @@ Default: `git revert` ## Syntax - git revert ``: Revert Git change at ``. + +## Examples + +- `"git revert blue air"`: Reverts the Git change on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/gitStage.mdx b/packages/app-web-docs/src/docs/user/actions/gitStage.mdx index 89be47315d7..a351e1e05c5 100644 --- a/packages/app-web-docs/src/docs/user/actions/gitStage.mdx +++ b/packages/app-web-docs/src/docs/user/actions/gitStage.mdx @@ -9,3 +9,7 @@ Default: `git stage` ## Syntax - git stage ``: Stage Git change at ``. + +## Examples + +- `"git stage blue air"`: Stages the Git change on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/gitUnstage.mdx b/packages/app-web-docs/src/docs/user/actions/gitUnstage.mdx index 2f5459c30ae..1db746d7a4c 100644 --- a/packages/app-web-docs/src/docs/user/actions/gitUnstage.mdx +++ b/packages/app-web-docs/src/docs/user/actions/gitUnstage.mdx @@ -9,3 +9,7 @@ Default: `git unstage` ## Syntax - git unstage ``: Unstage Git change at ``. + +## Examples + +- `"git unstage blue air"`: Unstages the Git change on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/highlight.mdx b/packages/app-web-docs/src/docs/user/actions/highlight.mdx index f1f6ec0edc7..c66ffa333f5 100644 --- a/packages/app-web-docs/src/docs/user/actions/highlight.mdx +++ b/packages/app-web-docs/src/docs/user/actions/highlight.mdx @@ -9,3 +9,7 @@ Default: `highlight` ## Syntax - highlight ``: Highlight ``. + +## Examples + +- `"highlight blue air"`: Highlights the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/increment.mdx b/packages/app-web-docs/src/docs/user/actions/increment.mdx index eb315f8df25..e730f7ecf50 100644 --- a/packages/app-web-docs/src/docs/user/actions/increment.mdx +++ b/packages/app-web-docs/src/docs/user/actions/increment.mdx @@ -9,3 +9,7 @@ Default: `increment` ## Syntax - increment ``: Increment number at ``. + +## Examples + +- `"increment blue air"`: Increments the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/indentLine.mdx b/packages/app-web-docs/src/docs/user/actions/indentLine.mdx index 48437ec929b..594f18903f0 100644 --- a/packages/app-web-docs/src/docs/user/actions/indentLine.mdx +++ b/packages/app-web-docs/src/docs/user/actions/indentLine.mdx @@ -9,3 +9,7 @@ Default: `indent` ## Syntax - indent ``: Indent line containing ``. + +## Examples + +- `"indent blue air"`: Indents the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/insertCopyAfter.mdx b/packages/app-web-docs/src/docs/user/actions/insertCopyAfter.mdx index 04a331ad6ef..f78fb824014 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertCopyAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertCopyAfter.mdx @@ -9,3 +9,7 @@ Default: `clone` ## Syntax - clone ``: Insert copy after ``. + +## Examples + +- `"clone funk blue air"`: Inserts a copy of the function containing the token containing letter 'a' with a blue hat after itself. diff --git a/packages/app-web-docs/src/docs/user/actions/insertCopyBefore.mdx b/packages/app-web-docs/src/docs/user/actions/insertCopyBefore.mdx index c605b362aa9..47aa0fcfb5b 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertCopyBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertCopyBefore.mdx @@ -9,3 +9,7 @@ Default: `clone up` ## Syntax - clone up ``: Insert copy before ``. + +## Examples + +- `"clone up funk blue air"`: Inserts a copy of the function containing the token containing letter 'a' with a blue hat before itself. diff --git a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx index a102210e612..3c969c7a5a0 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx @@ -9,3 +9,8 @@ Default: `float` ## Syntax - float ``: Insert empty line after ``. + +## Examples + +- `"float blue air"`: Inserts an empty line below the token containing letter 'a' with a blue hat without moving the cursor. +- `"float item blue air"`: Inserts the required delimiter after the collection item containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx index 4e692773ffa..3a13300583e 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx @@ -9,3 +9,8 @@ Default: `drop` ## Syntax - drop ``: Insert empty line before ``. + +## Examples + +- `"drop blue air"`: Inserts an empty line above the token containing letter 'a' with a blue hat without moving the cursor. +- `"drop item blue air"`: Inserts the required delimiter before the collection item containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx b/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx index 6fee99b7418..3d3d5d0d7c9 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx @@ -9,3 +9,8 @@ Default: `puff` ## Syntax - puff ``: Insert empty lines around ``. + +## Examples + +- `"puff blue air"`: Inserts empty lines around the line containing the token containing letter 'a' with a blue hat without moving the cursor. +- `"puff token blue air"`: Inserts spaces around the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx b/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx index 4918224159f..b86e9a3adeb 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx @@ -9,3 +9,7 @@ Default: `snip` ## Syntax - snip `` ``: Insert snippet at ``. + +## Examples + +- `"snip after blue air"`: Inserts an if-statement snippet after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/joinLines.mdx b/packages/app-web-docs/src/docs/user/actions/joinLines.mdx index 705270bcd57..da549c32fd5 100644 --- a/packages/app-web-docs/src/docs/user/actions/joinLines.mdx +++ b/packages/app-web-docs/src/docs/user/actions/joinLines.mdx @@ -9,3 +9,7 @@ Default: `join` ## Syntax - join ``: Join lines at ``. + +## Examples + +- `"join blue air"`: Joins the line containing the token containing letter 'a' with a blue hat with the following line. diff --git a/packages/app-web-docs/src/docs/user/actions/moveToTarget.mdx b/packages/app-web-docs/src/docs/user/actions/moveToTarget.mdx index 8520895b34d..49b6f3872dc 100644 --- a/packages/app-web-docs/src/docs/user/actions/moveToTarget.mdx +++ b/packages/app-web-docs/src/docs/user/actions/moveToTarget.mdx @@ -10,3 +10,7 @@ Default: `move` - move ``: Move `` to selection. - move `` ``: Move `` to ``. + +## Examples + +- `"move blue air after green bat"`: Moves the token containing letter 'a' with a blue hat to after the token containing letter 'b' with a green hat. diff --git a/packages/app-web-docs/src/docs/user/actions/nextHomophone.mdx b/packages/app-web-docs/src/docs/user/actions/nextHomophone.mdx index d4cf8a9e822..00c3482fa5b 100644 --- a/packages/app-web-docs/src/docs/user/actions/nextHomophone.mdx +++ b/packages/app-web-docs/src/docs/user/actions/nextHomophone.mdx @@ -9,3 +9,7 @@ Default: `phones` ## Syntax - phones ``: Cycle to next homophone for ``. + +## Examples + +- `"phones blue air"`: Replaces the token containing letter 'a' with a blue hat with its next homophone. diff --git a/packages/app-web-docs/src/docs/user/actions/outdentLine.mdx b/packages/app-web-docs/src/docs/user/actions/outdentLine.mdx index c84db27f074..a100766af24 100644 --- a/packages/app-web-docs/src/docs/user/actions/outdentLine.mdx +++ b/packages/app-web-docs/src/docs/user/actions/outdentLine.mdx @@ -9,3 +9,7 @@ Default: `dedent` ## Syntax - dedent ``: Outdent line containing ``. + +## Examples + +- `"dedent blue air"`: Decreases the indentation of the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/pasteFromClipboard.mdx b/packages/app-web-docs/src/docs/user/actions/pasteFromClipboard.mdx index 59da8e93ea0..dd01d90cc47 100644 --- a/packages/app-web-docs/src/docs/user/actions/pasteFromClipboard.mdx +++ b/packages/app-web-docs/src/docs/user/actions/pasteFromClipboard.mdx @@ -9,3 +9,7 @@ Default: `paste` ## Syntax - paste ``: Paste from clipboard at ``. + +## Examples + +- `"paste after blue air"`: Pastes the clipboard contents after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/randomizeTargets.mdx b/packages/app-web-docs/src/docs/user/actions/randomizeTargets.mdx index 68ee22b054e..52b7817073d 100644 --- a/packages/app-web-docs/src/docs/user/actions/randomizeTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/randomizeTargets.mdx @@ -9,3 +9,7 @@ Default: `shuffle` ## Syntax - shuffle ``: Randomize ``s. + +## Examples + +- `"shuffle every item blue air"`: Randomizes the collection items associated with the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/rename.mdx b/packages/app-web-docs/src/docs/user/actions/rename.mdx index b0594228a67..21eee66011b 100644 --- a/packages/app-web-docs/src/docs/user/actions/rename.mdx +++ b/packages/app-web-docs/src/docs/user/actions/rename.mdx @@ -9,3 +9,7 @@ Default: `rename` ## Syntax - rename ``: Rename ``. + +## Examples + +- `"rename blue air"`: Starts renaming the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/replaceWithTarget.mdx b/packages/app-web-docs/src/docs/user/actions/replaceWithTarget.mdx index f66b2a78d58..c63e7fa29fb 100644 --- a/packages/app-web-docs/src/docs/user/actions/replaceWithTarget.mdx +++ b/packages/app-web-docs/src/docs/user/actions/replaceWithTarget.mdx @@ -10,3 +10,7 @@ Default: `bring` - bring ``: Insert copy of `` at selection. - bring `` ``: Copy `` to ``. + +## Examples + +- `"bring blue air to green bat"`: Replaces the token containing letter 'b' with a green hat with a copy of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/revealDefinition.mdx b/packages/app-web-docs/src/docs/user/actions/revealDefinition.mdx index 3e5c3f45887..e8727c48ae0 100644 --- a/packages/app-web-docs/src/docs/user/actions/revealDefinition.mdx +++ b/packages/app-web-docs/src/docs/user/actions/revealDefinition.mdx @@ -9,3 +9,7 @@ Default: `define` ## Syntax - define ``: Reveal definition of ``. + +## Examples + +- `"define blue air"`: Opens the definition of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/revealTypeDefinition.mdx b/packages/app-web-docs/src/docs/user/actions/revealTypeDefinition.mdx index 551d95e992d..1f58487ef11 100644 --- a/packages/app-web-docs/src/docs/user/actions/revealTypeDefinition.mdx +++ b/packages/app-web-docs/src/docs/user/actions/revealTypeDefinition.mdx @@ -9,3 +9,7 @@ Default: `type deaf` ## Syntax - type deaf ``: Reveal type definition of ``. + +## Examples + +- `"type deaf blue air"`: Opens the type definition of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/reverseTargets.mdx b/packages/app-web-docs/src/docs/user/actions/reverseTargets.mdx index 9d4f4b643e0..0dfdf181a60 100644 --- a/packages/app-web-docs/src/docs/user/actions/reverseTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/reverseTargets.mdx @@ -9,3 +9,7 @@ Default: `reverse` ## Syntax - reverse ``: Reverse ``s. + +## Examples + +- `"reverse every item blue air"`: Reverses the collection items associated with the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/rewrapWithPairedDelimiter.mdx b/packages/app-web-docs/src/docs/user/actions/rewrapWithPairedDelimiter.mdx index 28410df99f0..e7534e0f196 100644 --- a/packages/app-web-docs/src/docs/user/actions/rewrapWithPairedDelimiter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/rewrapWithPairedDelimiter.mdx @@ -9,3 +9,7 @@ Default: `repack` ## Syntax - `` repack ``: Rewrap `` with ``. + +## Examples + +- `"curly repack blue air"`: Replaces the paired delimiters around the token containing letter 'a' with a blue hat with curly brackets. diff --git a/packages/app-web-docs/src/docs/user/actions/scrollToBottom.mdx b/packages/app-web-docs/src/docs/user/actions/scrollToBottom.mdx index fea3f9e0409..fc8193f8534 100644 --- a/packages/app-web-docs/src/docs/user/actions/scrollToBottom.mdx +++ b/packages/app-web-docs/src/docs/user/actions/scrollToBottom.mdx @@ -9,3 +9,7 @@ Default: `bottom` ## Syntax - bottom ``: Scroll `` to bottom of the viewport. + +## Examples + +- `"bottom blue air"`: Scrolls the token containing letter 'a' with a blue hat to the bottom of the viewport. diff --git a/packages/app-web-docs/src/docs/user/actions/scrollToCenter.mdx b/packages/app-web-docs/src/docs/user/actions/scrollToCenter.mdx index 4c63dd8a87c..0bdd0887eba 100644 --- a/packages/app-web-docs/src/docs/user/actions/scrollToCenter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/scrollToCenter.mdx @@ -9,3 +9,7 @@ Default: `center` ## Syntax - center ``: Scroll `` to center of the viewport. + +## Examples + +- `"center blue air"`: Scrolls the token containing letter 'a' with a blue hat to the center of the viewport. diff --git a/packages/app-web-docs/src/docs/user/actions/scrollToTop.mdx b/packages/app-web-docs/src/docs/user/actions/scrollToTop.mdx index 8f1a7f973ee..78e9f581bc0 100644 --- a/packages/app-web-docs/src/docs/user/actions/scrollToTop.mdx +++ b/packages/app-web-docs/src/docs/user/actions/scrollToTop.mdx @@ -9,3 +9,7 @@ Default: `crown` ## Syntax - crown ``: Scroll `` to top of the viewport. + +## Examples + +- `"crown blue air"`: Scrolls the token containing letter 'a' with a blue hat to the top of the viewport. diff --git a/packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx b/packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx index c9321d93cad..7c3420ed849 100644 --- a/packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx +++ b/packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx @@ -11,3 +11,7 @@ Default: `from` ## Syntax - from ``: Set instance reference to ``. + +## Examples + +- `"from funk blue air take every instance green bat"`: Selects every instance of the token containing letter 'b' with a green hat within the function containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/setSelection.mdx b/packages/app-web-docs/src/docs/user/actions/setSelection.mdx index 70b9e362bd4..7b1efebc201 100644 --- a/packages/app-web-docs/src/docs/user/actions/setSelection.mdx +++ b/packages/app-web-docs/src/docs/user/actions/setSelection.mdx @@ -9,3 +9,7 @@ Default: `take` ## Syntax - take ``: Set selection to ``. + +## Examples + +- `"take blue air"`: Selects the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/setSelectionAfter.mdx b/packages/app-web-docs/src/docs/user/actions/setSelectionAfter.mdx index 6336804ff6d..c0084042a36 100644 --- a/packages/app-web-docs/src/docs/user/actions/setSelectionAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/setSelectionAfter.mdx @@ -9,3 +9,7 @@ Default: `post` ## Syntax - post ``: Set empty selection after ``. + +## Examples + +- `"post blue air"`: Places the cursor after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/setSelectionBefore.mdx b/packages/app-web-docs/src/docs/user/actions/setSelectionBefore.mdx index 90a37072077..e9f6bef7e8b 100644 --- a/packages/app-web-docs/src/docs/user/actions/setSelectionBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/setSelectionBefore.mdx @@ -9,3 +9,7 @@ Default: `pre` ## Syntax - pre ``: Set empty selection before ``. + +## Examples + +- `"pre blue air"`: Places the cursor before the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/showDebugHover.mdx b/packages/app-web-docs/src/docs/user/actions/showDebugHover.mdx index 8ba5cd587d2..b1b9680d615 100644 --- a/packages/app-web-docs/src/docs/user/actions/showDebugHover.mdx +++ b/packages/app-web-docs/src/docs/user/actions/showDebugHover.mdx @@ -9,3 +9,7 @@ Default: `inspect` ## Syntax - inspect ``: Show debug hover for ``. + +## Examples + +- `"inspect blue air"`: Shows debug information for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/showHover.mdx b/packages/app-web-docs/src/docs/user/actions/showHover.mdx index a246baf2591..beaa0f71567 100644 --- a/packages/app-web-docs/src/docs/user/actions/showHover.mdx +++ b/packages/app-web-docs/src/docs/user/actions/showHover.mdx @@ -9,3 +9,7 @@ Default: `hover` ## Syntax - hover ``: Show hover for ``. + +## Examples + +- `"hover blue air"`: Shows hover information for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/showQuickFix.mdx b/packages/app-web-docs/src/docs/user/actions/showQuickFix.mdx index 6bb48009414..1ddab315930 100644 --- a/packages/app-web-docs/src/docs/user/actions/showQuickFix.mdx +++ b/packages/app-web-docs/src/docs/user/actions/showQuickFix.mdx @@ -9,3 +9,7 @@ Default: `quick fix` ## Syntax - quick fix ``: Show quick fix for ``. + +## Examples + +- `"quick fix blue air"`: Shows quick fixes for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/showReferences.mdx b/packages/app-web-docs/src/docs/user/actions/showReferences.mdx index 13df173051c..97a180d2ebe 100644 --- a/packages/app-web-docs/src/docs/user/actions/showReferences.mdx +++ b/packages/app-web-docs/src/docs/user/actions/showReferences.mdx @@ -9,3 +9,7 @@ Default: `reference` ## Syntax - reference ``: Show references for ``. + +## Examples + +- `"reference blue air"`: Shows references to the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/sortTargets.mdx b/packages/app-web-docs/src/docs/user/actions/sortTargets.mdx index f576a458fb4..5168492cedd 100644 --- a/packages/app-web-docs/src/docs/user/actions/sortTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/sortTargets.mdx @@ -9,3 +9,7 @@ Default: `sort` ## Syntax - sort ``: Sort ``s. + +## Examples + +- `"sort every item blue air"`: Sorts the collection items associated with the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/swapTargets.mdx b/packages/app-web-docs/src/docs/user/actions/swapTargets.mdx index bae5c1dae67..a397d5955a7 100644 --- a/packages/app-web-docs/src/docs/user/actions/swapTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/swapTargets.mdx @@ -10,3 +10,7 @@ Default: `swap` - swap with ``: Swap selection with ``. - swap `` with ``: Swap `` with ``. + +## Examples + +- `"swap blue air with green bat"`: Swaps the token containing letter 'a' with a blue hat and the token containing letter 'b' with a green hat. diff --git a/packages/app-web-docs/src/docs/user/actions/toggleLineBreakpoint.mdx b/packages/app-web-docs/src/docs/user/actions/toggleLineBreakpoint.mdx index 6d0cd6a57b7..634e093b774 100644 --- a/packages/app-web-docs/src/docs/user/actions/toggleLineBreakpoint.mdx +++ b/packages/app-web-docs/src/docs/user/actions/toggleLineBreakpoint.mdx @@ -12,3 +12,7 @@ Default: `break point` - break point ``: Toggle breakpoint on line containing ``. - break point token ``: Toggle inline breakpoint at ``. + +## Examples + +- `"break point blue air"`: Toggles a breakpoint on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/toggleLineComment.mdx b/packages/app-web-docs/src/docs/user/actions/toggleLineComment.mdx index 4f58da1682d..b4a1c698a80 100644 --- a/packages/app-web-docs/src/docs/user/actions/toggleLineComment.mdx +++ b/packages/app-web-docs/src/docs/user/actions/toggleLineComment.mdx @@ -9,3 +9,7 @@ Default: `comment` ## Syntax - comment ``: Toggle line comment at ``. + +## Examples + +- `"comment blue air"`: Toggles the comment on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/unfoldRegion.mdx b/packages/app-web-docs/src/docs/user/actions/unfoldRegion.mdx index 4fbaf19f1ff..7afa8567b93 100644 --- a/packages/app-web-docs/src/docs/user/actions/unfoldRegion.mdx +++ b/packages/app-web-docs/src/docs/user/actions/unfoldRegion.mdx @@ -9,3 +9,7 @@ Default: `unfold` ## Syntax - unfold ``: Unfold region at ``. + +## Examples + +- `"unfold funk blue air"`: Unfolds the function containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/wrapWithPairedDelimiter.mdx b/packages/app-web-docs/src/docs/user/actions/wrapWithPairedDelimiter.mdx index eba21f32269..daa8755b465 100644 --- a/packages/app-web-docs/src/docs/user/actions/wrapWithPairedDelimiter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/wrapWithPairedDelimiter.mdx @@ -9,3 +9,7 @@ Default: `wrap` ## Syntax - `` wrap ``: Wrap `` with ``. + +## Examples + +- `"box wrap blue air"`: Wraps the token containing letter 'a' with a blue hat in square brackets. diff --git a/packages/app-web-docs/src/docs/user/actions/wrapWithSnippet.mdx b/packages/app-web-docs/src/docs/user/actions/wrapWithSnippet.mdx index 1244c6e5ce1..021f8460612 100644 --- a/packages/app-web-docs/src/docs/user/actions/wrapWithSnippet.mdx +++ b/packages/app-web-docs/src/docs/user/actions/wrapWithSnippet.mdx @@ -9,3 +9,7 @@ Default: `wrap` ## Syntax - `` wrap ``: Wrap `` with ``. + +## Examples + +- `"if wrap blue air"`: Wraps the token containing letter 'a' with a blue hat in an if-statement snippet. diff --git a/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx b/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx index ac2c22cde80..1c77a82b3bf 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx @@ -9,3 +9,7 @@ Default: `grand` ## Syntax - grand ``: Grandparent containing instance of ``. + +## Examples + +- `"take grand state blue air"`: Selects the parent statement of the statement containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx b/packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx index 7656963f6ee..15a2f1ba807 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx @@ -5,3 +5,7 @@ Cursorless ID: `containingScope` ## Syntax - ``: Containing instance of ``. + +## Examples + +- `"take state blue air"`: Selects the statement containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/endOf.mdx b/packages/app-web-docs/src/docs/user/modifiers/endOf.mdx index f5854c0d554..89f547f4298 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/endOf.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/endOf.mdx @@ -9,3 +9,7 @@ Default: `end of` ## Syntax - end of: Empty position at end of target. + +## Examples + +- `"take end of blue air"`: Places the cursor at the end of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx b/packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx index f8add57226e..de643fa1366 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx @@ -9,3 +9,7 @@ Default: `every` ## Syntax - every ``: Every instance of ``. + +## Examples + +- `"take every item blue air"`: Selects every item in the map containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/excludeInterior.mdx b/packages/app-web-docs/src/docs/user/modifiers/excludeInterior.mdx index 6eb3e90a795..30f084061ca 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/excludeInterior.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/excludeInterior.mdx @@ -9,3 +9,7 @@ Default: `bounds` ## Syntax - bounds: Bounding paired delimiters. + +## Examples + +- `"take bounds round blue air"`: Selects only the parentheses containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx b/packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx index 0b503d74005..dc5d643558b 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx @@ -10,3 +10,7 @@ Default: `tail` - tail: Extend through end of line/pair. - tail ``: Extend through end of ``. + +## Examples + +- `"take tail blue air"`: Selects from the token containing letter 'a' with a blue hat through the end of its line or surrounding pair. diff --git a/packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx b/packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx index 529b1926266..f518509520c 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx @@ -10,3 +10,7 @@ Default: `head` - head: Extend through start of line/pair. - head ``: Extend through start of ``. + +## Examples + +- `"take head blue air"`: Selects from the token containing letter 'a' with a blue hat through the start of its line or surrounding pair. diff --git a/packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx b/packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx index 5d160818736..96915f09a4d 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx @@ -9,3 +9,7 @@ Default: `its` ## Syntax - its: Infer previous mark. + +## Examples + +- `"take blue air past end of its line"`: Selects from the token containing letter 'a' with a blue hat through the end of the line containing that token. diff --git a/packages/app-web-docs/src/docs/user/modifiers/interiorOnly.mdx b/packages/app-web-docs/src/docs/user/modifiers/interiorOnly.mdx index 82a90963bad..5ffb513dd33 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/interiorOnly.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/interiorOnly.mdx @@ -9,3 +9,7 @@ Default: `inside` ## Syntax - inside: Interior only. + +## Examples + +- `"take inside round blue air"`: Selects the contents of the parentheses containing the token containing letter 'a' with a blue hat, excluding the parentheses. diff --git a/packages/app-web-docs/src/docs/user/modifiers/keepContentFilter.mdx b/packages/app-web-docs/src/docs/user/modifiers/keepContentFilter.mdx index b7016d7a349..2329e762b17 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/keepContentFilter.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/keepContentFilter.mdx @@ -9,3 +9,7 @@ Default: `content` ## Syntax - content: Keep content filter. + +## Examples + +- `"take content"`: Selects only to the nonempty selections when there are multiple selections. diff --git a/packages/app-web-docs/src/docs/user/modifiers/keepEmptyFilter.mdx b/packages/app-web-docs/src/docs/user/modifiers/keepEmptyFilter.mdx index ad485607a57..5dc413b341e 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/keepEmptyFilter.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/keepEmptyFilter.mdx @@ -9,3 +9,7 @@ Default: `empty` ## Syntax - empty: Keep empty filter. + +## Examples + +- `"take empty"`: Selects only the empty selections when there are multiple selections. diff --git a/packages/app-web-docs/src/docs/user/modifiers/leading.mdx b/packages/app-web-docs/src/docs/user/modifiers/leading.mdx index 8d2f97d26ab..cb68bfe9cf8 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/leading.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/leading.mdx @@ -9,3 +9,7 @@ Default: `leading` ## Syntax - leading: Leading delimiter range. + +## Examples + +- `"take leading item blue air"`: Selects the leading delimiter of the item containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx b/packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx index 811bda5be9b..e648fa3b433 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx @@ -10,3 +10,8 @@ Cursorless ID: `ordinalScope` - every first `` ``s: First `` instances of `` in iteration scope, as individual targets. - last `` ``s: Last `` instances of `` in iteration scope, as contiguous range. - every last `` ``s: Last `` instances of `` in iteration scope, as individual targets. + +## Examples + +- `"take third state"`: Selects the third statement in the iteration scope. +- `"take first three states"`: Selects a contiguous range containing the first three statements in the iteration scope. diff --git a/packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx b/packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx index 17f60ebbcd0..2a2312de013 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx @@ -18,3 +18,8 @@ Cursorless ID: `relativeScope` - every previous `` ``s: Previous `` instances of ``, as individual targets. - next `` ``s: Next `` instances of ``, as contiguous range. - every next `` ``s: Next `` instances of ``, as individual targets. + +## Examples + +- `"take next state blue air"`: Selects the next statement after the statement containing the token containing letter 'a' with a blue hat. +- `"take three states backward blue air"`: Selects three statements as a contiguous range, starting at the token containing letter 'a' with a blue hat and going backward. diff --git a/packages/app-web-docs/src/docs/user/modifiers/startOf.mdx b/packages/app-web-docs/src/docs/user/modifiers/startOf.mdx index aa7ea21daa3..3915ad01890 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/startOf.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/startOf.mdx @@ -9,3 +9,7 @@ Default: `start of` ## Syntax - start of: Empty position at start of target. + +## Examples + +- `"take start of blue air"`: Places the cursor at the start of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/toRawSelection.mdx b/packages/app-web-docs/src/docs/user/modifiers/toRawSelection.mdx index 79aa46b991c..0ff532f6d56 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/toRawSelection.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/toRawSelection.mdx @@ -9,3 +9,7 @@ Default: `just` ## Syntax - just: No inference. + +## Examples + +- `"chuck just blue air"`: Deletes only the token containing letter 'a' with a blue hat, leaving adjacent whitespace unchanged. diff --git a/packages/app-web-docs/src/docs/user/modifiers/trailing.mdx b/packages/app-web-docs/src/docs/user/modifiers/trailing.mdx index cdf6807416c..85484fba89f 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/trailing.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/trailing.mdx @@ -9,3 +9,7 @@ Default: `trailing` ## Syntax - trailing: Trailing delimiter range. + +## Examples + +- `"take trailing item blue air"`: Selects the trailing delimiter of the item containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/visible.mdx b/packages/app-web-docs/src/docs/user/modifiers/visible.mdx index 6678e13c668..d34ec5664bd 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/visible.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/visible.mdx @@ -9,3 +9,7 @@ Default: `visible` ## Syntax - visible: Visible in viewport. + +## Examples + +- `"take visible"`: Selects the content currently visible in the editor viewport. diff --git a/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx b/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx index a47bd16c86f..e3f6143a2d8 100644 --- a/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx @@ -12,4 +12,8 @@ Default: `lambda` - lambda: Anonymous function. +## Examples + +- `"take lambda blue air"`: Selects the anonymous function containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx b/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx index 081766e5bcd..6e18a98d5cb 100644 --- a/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx @@ -12,4 +12,8 @@ Default: `arg list` - arg list: Argument list. +## Examples + +- `"take arg list blue air"`: Selects the argument list containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx b/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx index a38f9d6b496..5ec7de7b831 100644 --- a/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx @@ -12,4 +12,8 @@ Default: `arg` - arg: Argument. +## Examples + +- `"take arg blue air"`: Selects the argument or parameter containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/attribute.mdx b/packages/app-web-docs/src/docs/user/scopes/attribute.mdx index 38eb84adaaf..526fd9020ef 100644 --- a/packages/app-web-docs/src/docs/user/scopes/attribute.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/attribute.mdx @@ -12,4 +12,8 @@ Default: `attribute` - attribute: Attribute. +## Examples + +- `"take attribute blue air"`: Selects the attribute containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/boundedNonWhitespaceSequence.mdx b/packages/app-web-docs/src/docs/user/scopes/boundedNonWhitespaceSequence.mdx index 4aac14a632c..173bb6e09dc 100644 --- a/packages/app-web-docs/src/docs/user/scopes/boundedNonWhitespaceSequence.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/boundedNonWhitespaceSequence.mdx @@ -16,4 +16,8 @@ Default: `short paint` - short paint: Non-whitespace sequence bounded by surrounding pair delimiters. +## Examples + +- `"take short paint blue air"`: Selects the bounded non-whitespace sequence containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/boundedParagraph.mdx b/packages/app-web-docs/src/docs/user/scopes/boundedParagraph.mdx index a40429b28f1..f35c193d325 100644 --- a/packages/app-web-docs/src/docs/user/scopes/boundedParagraph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/boundedParagraph.mdx @@ -12,4 +12,8 @@ Default: `short block` - short block: Paragraph bounded by surrounding pair delimiters. +## Examples + +- `"take short block blue air"`: Selects the bounded paragraph containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/branch.mdx b/packages/app-web-docs/src/docs/user/scopes/branch.mdx index 6319e1e5203..08f5cf465c8 100644 --- a/packages/app-web-docs/src/docs/user/scopes/branch.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/branch.mdx @@ -12,4 +12,8 @@ Default: `branch` - branch: Branch. +## Examples + +- `"take branch blue air"`: Selects the branch containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/chapter.mdx b/packages/app-web-docs/src/docs/user/scopes/chapter.mdx index e40992795bc..5dadb357f8d 100644 --- a/packages/app-web-docs/src/docs/user/scopes/chapter.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/chapter.mdx @@ -12,4 +12,8 @@ Default: `chapter` - chapter: Chapter. +## Examples + +- `"take chapter blue air"`: Selects the chapter containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/character.mdx b/packages/app-web-docs/src/docs/user/scopes/character.mdx index 952eb56ad21..1f314e1ee29 100644 --- a/packages/app-web-docs/src/docs/user/scopes/character.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/character.mdx @@ -12,4 +12,8 @@ Default: `char` - char: Character. +## Examples + +- `"take char blue air"`: Selects the character containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/class.mdx b/packages/app-web-docs/src/docs/user/scopes/class.mdx index 54732d6896a..fad252195ee 100644 --- a/packages/app-web-docs/src/docs/user/scopes/class.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/class.mdx @@ -12,4 +12,8 @@ Default: `class` - class: Class. +## Examples + +- `"take class blue air"`: Selects the class containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/className.mdx b/packages/app-web-docs/src/docs/user/scopes/className.mdx index d7009742fe7..73d6c9046de 100644 --- a/packages/app-web-docs/src/docs/user/scopes/className.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/className.mdx @@ -12,4 +12,8 @@ Default: `class name` - class name: Class name. +## Examples + +- `"take class name blue air"`: Selects the class name containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/collectionItem.mdx b/packages/app-web-docs/src/docs/user/scopes/collectionItem.mdx index ae9588c548c..76b0b6abf75 100644 --- a/packages/app-web-docs/src/docs/user/scopes/collectionItem.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/collectionItem.mdx @@ -12,4 +12,8 @@ Default: `item` - item: Collection item. +## Examples + +- `"take item blue air"`: Selects the collection item containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx b/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx index cfaf4c2b0cf..02c53d9f935 100644 --- a/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx @@ -12,4 +12,8 @@ Default: `key` - key: Collection key. +## Examples + +- `"take key blue air"`: Selects the collection key containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/command.mdx b/packages/app-web-docs/src/docs/user/scopes/command.mdx index 61f1ac178ab..e7a027ee137 100644 --- a/packages/app-web-docs/src/docs/user/scopes/command.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/command.mdx @@ -12,4 +12,8 @@ Default: `command` - command: Command. +## Examples + +- `"take command blue air"`: Selects the command containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/comment.mdx b/packages/app-web-docs/src/docs/user/scopes/comment.mdx index 2dd78964940..a1fc29ca6da 100644 --- a/packages/app-web-docs/src/docs/user/scopes/comment.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/comment.mdx @@ -12,4 +12,8 @@ Default: `comment` - comment: Comment. +## Examples + +- `"take comment blue air"`: Selects the comment containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/condition.mdx b/packages/app-web-docs/src/docs/user/scopes/condition.mdx index e7f45152b0d..23493b7346c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/condition.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/condition.mdx @@ -12,4 +12,8 @@ Default: `condition` - condition: Condition. +## Examples + +- `"take condition blue air"`: Selects the condition containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/document.mdx b/packages/app-web-docs/src/docs/user/scopes/document.mdx index e1267b8be0f..71d9f6ae1af 100644 --- a/packages/app-web-docs/src/docs/user/scopes/document.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/document.mdx @@ -12,4 +12,8 @@ Default: `file` - file: Document. +## Examples + +- `"take file blue air"`: Selects the document containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/environment.mdx b/packages/app-web-docs/src/docs/user/scopes/environment.mdx index a1b80532fe1..059231ca2dc 100644 --- a/packages/app-web-docs/src/docs/user/scopes/environment.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/environment.mdx @@ -12,4 +12,8 @@ Default: `environment` - environment: Environment. +## Examples + +- `"take environment blue air"`: Selects the environment containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/fullLine.mdx b/packages/app-web-docs/src/docs/user/scopes/fullLine.mdx index dae800b9b3f..1c529915ea5 100644 --- a/packages/app-web-docs/src/docs/user/scopes/fullLine.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/fullLine.mdx @@ -12,4 +12,8 @@ Default: `full line` - full line: Full line. +## Examples + +- `"take full line blue air"`: Selects the full line containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx b/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx index ba1fc8cd8b4..20ef1a7903c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx @@ -12,4 +12,8 @@ Default: `call` - call: Function call. +## Examples + +- `"take call blue air"`: Selects the function call containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx b/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx index cc809e1443e..c7d771f61b7 100644 --- a/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx @@ -12,4 +12,8 @@ Default: `callee` - callee: Function callee. +## Examples + +- `"take callee blue air"`: Selects the function callee containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/functionName.mdx b/packages/app-web-docs/src/docs/user/scopes/functionName.mdx index 7ccaa99212d..0f559d5c2d7 100644 --- a/packages/app-web-docs/src/docs/user/scopes/functionName.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/functionName.mdx @@ -12,4 +12,8 @@ Default: `funk name` - funk name: Function name. +## Examples + +- `"take funk name blue air"`: Selects the function name containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/glyph.mdx b/packages/app-web-docs/src/docs/user/scopes/glyph.mdx index 1de8ee15a94..c479bf0dbf1 100644 --- a/packages/app-web-docs/src/docs/user/scopes/glyph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/glyph.mdx @@ -12,4 +12,8 @@ Default: `glyph` - glyph ``: Instance of single character ``. +## Examples + +- `"take glyph blue air"`: Selects the character indicated by the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/identifier.mdx b/packages/app-web-docs/src/docs/user/scopes/identifier.mdx index eb89bd9c7aa..eaa35adf9d7 100644 --- a/packages/app-web-docs/src/docs/user/scopes/identifier.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/identifier.mdx @@ -12,4 +12,8 @@ Default: `identifier` - identifier: Identifier. +## Examples + +- `"take identifier blue air"`: Selects the identifier containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx b/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx index 32dd292d0e4..996412013ba 100644 --- a/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx @@ -12,4 +12,8 @@ Default: `if state` - if state: If statement. +## Examples + +- `"take if state blue air"`: Selects the if statement containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/instance.mdx b/packages/app-web-docs/src/docs/user/scopes/instance.mdx index e90bb9e0029..94bf021fa7b 100644 --- a/packages/app-web-docs/src/docs/user/scopes/instance.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/instance.mdx @@ -12,4 +12,8 @@ Default: `instance` - instance: Instance. +## Examples + +- `"take every instance blue air"`: Selects every instance of the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/line.mdx b/packages/app-web-docs/src/docs/user/scopes/line.mdx index e8c8689dee4..484270572af 100644 --- a/packages/app-web-docs/src/docs/user/scopes/line.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/line.mdx @@ -12,4 +12,8 @@ Default: `line` - line: Line. +## Examples + +- `"take line blue air"`: Selects the line containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/list.mdx b/packages/app-web-docs/src/docs/user/scopes/list.mdx index e160b1350fe..640abfe242e 100644 --- a/packages/app-web-docs/src/docs/user/scopes/list.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/list.mdx @@ -12,4 +12,8 @@ Default: `list` - list: List. +## Examples + +- `"take list blue air"`: Selects the list containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/map.mdx b/packages/app-web-docs/src/docs/user/scopes/map.mdx index 8aae8ba45cf..c4485d3e54b 100644 --- a/packages/app-web-docs/src/docs/user/scopes/map.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/map.mdx @@ -12,4 +12,8 @@ Default: `map` - map: Map. +## Examples + +- `"take map blue air"`: Selects the map containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/name.mdx b/packages/app-web-docs/src/docs/user/scopes/name.mdx index fb1bdd43138..b347378b88a 100644 --- a/packages/app-web-docs/src/docs/user/scopes/name.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/name.mdx @@ -12,4 +12,8 @@ Default: `name` - name: Name. +## Examples + +- `"take name blue air"`: Selects the name containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx b/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx index adcc4d9545f..a51bac0e96d 100644 --- a/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx @@ -12,4 +12,8 @@ Default: `funk` - funk: Named function. +## Examples + +- `"take funk blue air"`: Selects the named function containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/namedParagraph.mdx b/packages/app-web-docs/src/docs/user/scopes/namedParagraph.mdx index 00893b42777..f3679526c90 100644 --- a/packages/app-web-docs/src/docs/user/scopes/namedParagraph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/namedParagraph.mdx @@ -12,4 +12,8 @@ Default: `paragraph` - paragraph: Named paragraph. +## Examples + +- `"take paragraph blue air"`: Selects the named paragraph containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/nonWhitespaceSequence.mdx b/packages/app-web-docs/src/docs/user/scopes/nonWhitespaceSequence.mdx index 4c191cd44a7..8e412c7f2e0 100644 --- a/packages/app-web-docs/src/docs/user/scopes/nonWhitespaceSequence.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/nonWhitespaceSequence.mdx @@ -12,4 +12,8 @@ Default: `paint` - paint: Non-whitespace sequence. +## Examples + +- `"take paint blue air"`: Selects the non-whitespace sequence containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/notebookCell.mdx b/packages/app-web-docs/src/docs/user/scopes/notebookCell.mdx index 43d4cfecd7c..88da8182128 100644 --- a/packages/app-web-docs/src/docs/user/scopes/notebookCell.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/notebookCell.mdx @@ -12,4 +12,8 @@ Default: `cell` - cell: Notebook cell. +## Examples + +- `"take cell blue air"`: Selects the notebook cell containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/paragraph.mdx b/packages/app-web-docs/src/docs/user/scopes/paragraph.mdx index 51dc0feed12..26e05a5c079 100644 --- a/packages/app-web-docs/src/docs/user/scopes/paragraph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/paragraph.mdx @@ -12,4 +12,8 @@ Default: `block` - block: Paragraph. +## Examples + +- `"take block blue air"`: Selects the paragraph containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/part.mdx b/packages/app-web-docs/src/docs/user/scopes/part.mdx index 42cd85460d6..59d2c35914f 100644 --- a/packages/app-web-docs/src/docs/user/scopes/part.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/part.mdx @@ -12,4 +12,8 @@ Default: `part` - part: Part. +## Examples + +- `"take part blue air"`: Selects the part containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx b/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx index 2fc5a46ec93..6c51f748b79 100644 --- a/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx @@ -12,4 +12,8 @@ Default: `regex` - regex: Regular expression. +## Examples + +- `"take regex blue air"`: Selects the regular expression containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/section.mdx b/packages/app-web-docs/src/docs/user/scopes/section.mdx index 1d3f7c5b979..0bb2cd53241 100644 --- a/packages/app-web-docs/src/docs/user/scopes/section.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/section.mdx @@ -12,4 +12,8 @@ Default: `section` - section: Section. +## Examples + +- `"take section blue air"`: Selects the section containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelFive.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelFive.mdx index 7af86a33780..30212543db8 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelFive.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelFive.mdx @@ -13,4 +13,8 @@ Default: `five section`\ - five section: Section level five. +## Examples + +- `"take five section blue air"`: Selects the section level five containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelFour.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelFour.mdx index aeef649dfad..b3af8a9c578 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelFour.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelFour.mdx @@ -13,4 +13,8 @@ Default: `four section`\ - four section: Section level four. +## Examples + +- `"take four section blue air"`: Selects the section level four containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelOne.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelOne.mdx index b92e71d531c..0eca75159f0 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelOne.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelOne.mdx @@ -13,4 +13,8 @@ Default: `one section`\ - one section: Section level one. +## Examples + +- `"take one section blue air"`: Selects the section level one containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelSix.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelSix.mdx index 4199611aceb..51a108d0df4 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelSix.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelSix.mdx @@ -13,4 +13,8 @@ Default: `six section`\ - six section: Section level six. +## Examples + +- `"take six section blue air"`: Selects the section level six containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelThree.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelThree.mdx index cea79f312ef..5a8f2883b4c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelThree.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelThree.mdx @@ -13,4 +13,8 @@ Default: `three section`\ - three section: Section level three. +## Examples + +- `"take three section blue air"`: Selects the section level three containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelTwo.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelTwo.mdx index f39cc5f990b..d79233070fc 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelTwo.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelTwo.mdx @@ -13,4 +13,8 @@ Default: `two section`\ - two section: Section level two. +## Examples + +- `"take two section blue air"`: Selects the section level two containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/selector.mdx b/packages/app-web-docs/src/docs/user/scopes/selector.mdx index 1149a0905c7..87353e50fbe 100644 --- a/packages/app-web-docs/src/docs/user/scopes/selector.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/selector.mdx @@ -12,4 +12,8 @@ Default: `selector` - selector: Selector. +## Examples + +- `"take selector blue air"`: Selects the selector containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/sentence.mdx b/packages/app-web-docs/src/docs/user/scopes/sentence.mdx index f5e777bdb3a..2811e3537e3 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sentence.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sentence.mdx @@ -12,4 +12,8 @@ Default: `sentence` - sentence: Sentence. +## Examples + +- `"take sentence blue air"`: Selects the sentence containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/statement.mdx b/packages/app-web-docs/src/docs/user/scopes/statement.mdx index a9b721ab0e6..5331db88a4e 100644 --- a/packages/app-web-docs/src/docs/user/scopes/statement.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/statement.mdx @@ -12,4 +12,8 @@ Default: `state` - state: Statement. +## Examples + +- `"take state blue air"`: Selects the statement containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/subParagraph.mdx b/packages/app-web-docs/src/docs/user/scopes/subParagraph.mdx index 6e1e73abfc1..c603393bdf2 100644 --- a/packages/app-web-docs/src/docs/user/scopes/subParagraph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/subParagraph.mdx @@ -12,4 +12,8 @@ Default: `subparagraph` - subparagraph: Subparagraph. +## Examples + +- `"take subparagraph blue air"`: Selects the subparagraph containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/subSection.mdx b/packages/app-web-docs/src/docs/user/scopes/subSection.mdx index a60e7c87148..ffec3486122 100644 --- a/packages/app-web-docs/src/docs/user/scopes/subSection.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/subSection.mdx @@ -12,4 +12,8 @@ Default: `subsection` - subsection: Subsection. +## Examples + +- `"take subsection blue air"`: Selects the subsection containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/subSubSection.mdx b/packages/app-web-docs/src/docs/user/scopes/subSubSection.mdx index 6df78a5f663..7b540f1ffb1 100644 --- a/packages/app-web-docs/src/docs/user/scopes/subSubSection.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/subSubSection.mdx @@ -12,4 +12,8 @@ Default: `subsubsection` - subsubsection: Subsubsection. +## Examples + +- `"take subsubsection blue air"`: Selects the subsubsection containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/surroundingPair.mdx b/packages/app-web-docs/src/docs/user/scopes/surroundingPair.mdx index f1f0f05eac0..c23bc71f0a7 100644 --- a/packages/app-web-docs/src/docs/user/scopes/surroundingPair.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/surroundingPair.mdx @@ -8,4 +8,8 @@ Cursorless ID: `surroundingPair` - ``: Surrounding pair. +## Examples + +- `"take round blue air"`: Selects the parentheses containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/token.mdx b/packages/app-web-docs/src/docs/user/scopes/token.mdx index ad20363905e..b19d4f2dc46 100644 --- a/packages/app-web-docs/src/docs/user/scopes/token.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/token.mdx @@ -12,4 +12,8 @@ Default: `token` - token: Token. +## Examples + +- `"take token blue air"`: Selects the token containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/type.mdx b/packages/app-web-docs/src/docs/user/scopes/type.mdx index e6184963447..90f5497a83b 100644 --- a/packages/app-web-docs/src/docs/user/scopes/type.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/type.mdx @@ -12,4 +12,8 @@ Default: `type` - type: Type. +## Examples + +- `"take type blue air"`: Selects the type containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/unit.mdx b/packages/app-web-docs/src/docs/user/scopes/unit.mdx index ec8afaf7b73..677fb5e0787 100644 --- a/packages/app-web-docs/src/docs/user/scopes/unit.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/unit.mdx @@ -12,4 +12,8 @@ Default: `unit` - unit: Unit. +## Examples + +- `"take unit blue air"`: Selects the unit containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/url.mdx b/packages/app-web-docs/src/docs/user/scopes/url.mdx index 1a38067803c..74e5d760eb3 100644 --- a/packages/app-web-docs/src/docs/user/scopes/url.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/url.mdx @@ -12,4 +12,8 @@ Default: `link` - link: URL. +## Examples + +- `"take link blue air"`: Selects the url containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/value.mdx b/packages/app-web-docs/src/docs/user/scopes/value.mdx index 340febe9d2e..5c61cffd797 100644 --- a/packages/app-web-docs/src/docs/user/scopes/value.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/value.mdx @@ -12,4 +12,8 @@ Default: `value` - value: Value. +## Examples + +- `"take value blue air"`: Selects the value containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/word.mdx b/packages/app-web-docs/src/docs/user/scopes/word.mdx index 9051496d9c8..517ea126860 100644 --- a/packages/app-web-docs/src/docs/user/scopes/word.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/word.mdx @@ -13,4 +13,8 @@ Legacy: `word` - sub: Sub token word. +## Examples + +- `"take sub blue air"`: Selects the sub token word containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx b/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx index 8218dfab626..d231ac47f5c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx @@ -12,4 +12,8 @@ Default: `tags` - tags: XML both tags. +## Examples + +- `"take tags blue air"`: Selects the xml both tags containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/xmlElement.mdx b/packages/app-web-docs/src/docs/user/scopes/xmlElement.mdx index f2582bdacdd..0e88e38e581 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlElement.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlElement.mdx @@ -12,4 +12,8 @@ Default: `element` - element: XML element. +## Examples + +- `"take element blue air"`: Selects the xml element containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/xmlEndTag.mdx b/packages/app-web-docs/src/docs/user/scopes/xmlEndTag.mdx index 8e28752f35b..2a102fd58b0 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlEndTag.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlEndTag.mdx @@ -12,4 +12,8 @@ Default: `end tag` - end tag: XML end tag. +## Examples + +- `"take end tag blue air"`: Selects the xml end tag containing the token containing letter 'a' with a blue hat. + diff --git a/packages/app-web-docs/src/docs/user/scopes/xmlStartTag.mdx b/packages/app-web-docs/src/docs/user/scopes/xmlStartTag.mdx index 09bd6c3e28f..b563e7d2328 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlStartTag.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlStartTag.mdx @@ -12,4 +12,8 @@ Default: `start tag` - start tag: XML start tag. +## Examples + +- `"take start tag blue air"`: Selects the xml start tag containing the token containing letter 'a' with a blue hat. + diff --git a/packages/lib-common/src/references/actionReferences.ts b/packages/lib-common/src/references/actionReferences.ts index 09249afde37..8b3f233d1e6 100644 --- a/packages/lib-common/src/references/actionReferences.ts +++ b/packages/lib-common/src/references/actionReferences.ts @@ -1,9 +1,8 @@ import type { ActionType } from "../types/command/ActionDescriptor"; import { connectiveSpokenForms } from "./connectiveSpokenForms"; -import { getSpokenForm } from "./getSpokenForm"; -import type { ReferenceEntry } from "./ReferenceEntry"; -import { scopeReferences } from "./scopeReferences"; import { + REMOVE, + SET_SELECTION, VAR_DESTINATION, VAR_FORMATTER, VAR_PAIR, @@ -13,25 +12,27 @@ import { VAR_TARGET, VAR_TARGET_1, VAR_TARGET_2, -} from "./variables"; +} from "./constants"; +import { getSpokenForm } from "./getSpokenForm"; +import { modifierReferences } from "./modifierReferences"; +import type { ReferenceEntry } from "./ReferenceEntry"; +import { scopeReferences } from "./scopeReferences"; const TARGET = "blue air"; const TARGET_DESC = "token containing letter 'a' with a blue hat"; -// const TARGET_2 = "green bat"; -// const TARGET_2_DESC = "token containing letter 'b' with a green hat"; +const TARGET_2 = "green bat"; +const TARGET_2_DESC = "token containing letter 'b' with a green hat"; const DEFAULT_PATTERN = `${VAR_SPOKEN_FORM} ${VAR_TARGET}`; const DEFAULT_PATTERN_SCOPE = `${VAR_SPOKEN_FORM} ${VAR_SCOPE} ${VAR_TARGET}`; const DEFAULT_COMMAND = `${VAR_SPOKEN_FORM} ${TARGET}`; -// const COLLECTION_ITEM_SCOPE = getSpokenForm(scopeReferences.collectionItem); -// const FUNCTION_CALL_SCOPE = getSpokenForm(scopeReferences.functionCall); -// const INSTANCE_SCOPE = getSpokenForm(scopeReferences.instance); -// const NAMED_FUNCTION_SCOPE = getSpokenForm(scopeReferences.namedFunction); +const COLLECTION_ITEM_SCOPE = getSpokenForm(scopeReferences.collectionItem); +const FUNCTION_CALL_SCOPE = getSpokenForm(scopeReferences.functionCall); +const INSTANCE_SCOPE = getSpokenForm(scopeReferences.instance); +const NAMED_FUNCTION_SCOPE = getSpokenForm(scopeReferences.namedFunction); const TOKEN_SCOPE = getSpokenForm(scopeReferences.token); -// const EVERY_MODIFIER = getSpokenForm(modifierReferences.everyScope); -const SET_SELECTION_SPOKEN_FORM = "take"; - +const EVERY_MODIFIER = getSpokenForm(modifierReferences.everyScope); const SWAP_CONNECTIVE = connectiveSpokenForms.swapConnective; type TalonSideActionType = "applyFormatter" | "nextHomophone"; @@ -50,7 +51,12 @@ export const actionReferences: Record< cheatsheet: "Add selection", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Adds the ${TARGET_DESC} to the current selections.`, + }, + ], }, addSelectionAfter: { name: "Add selection after", @@ -62,7 +68,12 @@ export const actionReferences: Record< cheatsheet: "Add selection after", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Adds an empty selection after the ${TARGET_DESC}.`, + }, + ], }, addSelectionBefore: { name: "Add selection before", @@ -74,7 +85,12 @@ export const actionReferences: Record< cheatsheet: "Add selection before", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Adds an empty selection before the ${TARGET_DESC}.`, + }, + ], }, breakLine: { name: "Break line", @@ -86,7 +102,12 @@ export const actionReferences: Record< cheatsheet: "Breaks the line", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Breaks the line before the ${TARGET_DESC}.`, + }, + ], }, clearAndSetSelection: { name: "Change", @@ -99,7 +120,12 @@ export const actionReferences: Record< cheatsheet: "Change", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Deletes the ${TARGET_DESC} and leaves the cursor in its place.`, + }, + ], }, copyToClipboard: { name: "Copy to clipboard", @@ -111,7 +137,12 @@ export const actionReferences: Record< cheatsheet: "Copy to clipboard", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Copies the ${TARGET_DESC} to the clipboard.`, + }, + ], }, cutToClipboard: { name: "Cut to clipboard", @@ -123,7 +154,12 @@ export const actionReferences: Record< cheatsheet: "Cut to clipboard", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Cuts the ${TARGET_DESC} to the clipboard.`, + }, + ], }, decrement: { name: "Decrement", @@ -135,7 +171,12 @@ export const actionReferences: Record< cheatsheet: "Decrement number", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Decrements the number at the ${TARGET_DESC}.`, + }, + ], }, deselect: { name: "Deselect", @@ -147,7 +188,12 @@ export const actionReferences: Record< cheatsheet: "Deselect", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Removes the ${TARGET_DESC} from the current selections.`, + }, + ], }, editNewLineAfter: { name: "Edit new line/scope after", @@ -165,7 +211,16 @@ export const actionReferences: Record< cheatsheet: `Edit new ${VAR_SCOPE} after`, }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Inserts a new line below the ${TARGET_DESC} and moves the cursor to it.`, + }, + { + command: `${VAR_SPOKEN_FORM} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + description: `Inserts the delimiters for a new collection item after the item containing the ${TARGET_DESC} and moves the cursor there.`, + }, + ], }, editNewLineBefore: { name: "Edit new line/scope before", @@ -183,7 +238,16 @@ export const actionReferences: Record< cheatsheet: `Edit new ${VAR_SCOPE} before`, }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Inserts a new line above the ${TARGET_DESC} and moves the cursor to it.`, + }, + { + command: `${VAR_SPOKEN_FORM} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + description: `Inserts the delimiters for a new collection item before the item containing the ${TARGET_DESC} and moves the cursor there.`, + }, + ], }, "experimental.setInstanceReference": { name: "Set instance reference", @@ -197,7 +261,12 @@ export const actionReferences: Record< cheatsheet: "Set instance reference", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET} ${SET_SELECTION} ${EVERY_MODIFIER} ${INSTANCE_SCOPE} ${TARGET_2}`, + description: `Selects every instance of the ${TARGET_2_DESC} within the function containing the ${TARGET_DESC}.`, + }, + ], }, extractVariable: { name: "Extract variable", @@ -209,7 +278,12 @@ export const actionReferences: Record< cheatsheet: "Extract variable", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${FUNCTION_CALL_SCOPE} ${TARGET}`, + description: `Extracts the function call containing the ${TARGET_DESC} into a variable.`, + }, + ], }, findInDocument: { name: "Find in document", @@ -221,7 +295,12 @@ export const actionReferences: Record< cheatsheet: "Find in document", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Searches the current document for the ${TARGET_DESC}.`, + }, + ], }, findInWorkspace: { name: "Find in workspace", @@ -233,7 +312,12 @@ export const actionReferences: Record< cheatsheet: "Find in workspace", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Searches the workspace for the ${TARGET_DESC}.`, + }, + ], }, flashTargets: { name: "Flash target", @@ -245,7 +329,12 @@ export const actionReferences: Record< cheatsheet: "Flash target", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Briefly flashes the ${TARGET_DESC}.`, + }, + ], }, foldRegion: { name: "Fold region", @@ -257,7 +346,12 @@ export const actionReferences: Record< cheatsheet: "Fold region", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + description: `Folds the function containing the ${TARGET_DESC}.`, + }, + ], }, followLink: { name: "Follow link", @@ -269,7 +363,12 @@ export const actionReferences: Record< cheatsheet: "Follow link", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Opens the link containing the ${TARGET_DESC}.`, + }, + ], }, followLinkAside: { name: "Follow link aside", @@ -281,7 +380,12 @@ export const actionReferences: Record< cheatsheet: "Follow link aside", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Opens the link containing the ${TARGET_DESC} in a split view.`, + }, + ], }, gitAccept: { name: "Git accept", @@ -293,7 +397,12 @@ export const actionReferences: Record< cheatsheet: "Git accept", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Accepts the Git change on the line containing the ${TARGET_DESC}.`, + }, + ], }, gitRevert: { name: "Git revert", @@ -305,7 +414,12 @@ export const actionReferences: Record< cheatsheet: "Git revert", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Reverts the Git change on the line containing the ${TARGET_DESC}.`, + }, + ], }, gitStage: { name: "Git stage", @@ -317,7 +431,12 @@ export const actionReferences: Record< cheatsheet: "Git stage", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Stages the Git change on the line containing the ${TARGET_DESC}.`, + }, + ], }, gitUnstage: { name: "Git unstage", @@ -329,7 +448,12 @@ export const actionReferences: Record< cheatsheet: "Git unstage", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Unstages the Git change on the line containing the ${TARGET_DESC}.`, + }, + ], }, increment: { name: "Increment", @@ -341,7 +465,12 @@ export const actionReferences: Record< cheatsheet: "Increment number", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Increments the ${TARGET_DESC}.`, + }, + ], }, indentLine: { name: "Indent line", @@ -353,7 +482,12 @@ export const actionReferences: Record< cheatsheet: "Indent line", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Indents the line containing the ${TARGET_DESC}.`, + }, + ], }, insertCopyAfter: { name: "Insert copy after", @@ -365,7 +499,12 @@ export const actionReferences: Record< cheatsheet: "Insert copy after", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + description: `Inserts a copy of the function containing the ${TARGET_DESC} after itself.`, + }, + ], }, insertCopyBefore: { name: "Insert copy before", @@ -377,7 +516,12 @@ export const actionReferences: Record< cheatsheet: "Insert copy before", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + description: `Inserts a copy of the function containing the ${TARGET_DESC} before itself.`, + }, + ], }, insertEmptyLineAfter: { name: "Insert empty line after", @@ -389,7 +533,16 @@ export const actionReferences: Record< cheatsheet: "Insert empty line after", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Inserts an empty line below the ${TARGET_DESC} without moving the cursor.`, + }, + { + command: `${VAR_SPOKEN_FORM} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + description: `Inserts the required delimiter after the collection item containing the ${TARGET_DESC}.`, + }, + ], }, insertEmptyLineBefore: { name: "Insert empty line before", @@ -401,7 +554,16 @@ export const actionReferences: Record< cheatsheet: "Insert empty line before", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Inserts an empty line above the ${TARGET_DESC} without moving the cursor.`, + }, + { + command: `${VAR_SPOKEN_FORM} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + description: `Inserts the required delimiter before the collection item containing the ${TARGET_DESC}.`, + }, + ], }, insertEmptyLinesAround: { name: "Insert empty lines around", @@ -413,7 +575,16 @@ export const actionReferences: Record< cheatsheet: "Insert empty lines around", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Inserts empty lines around the line containing the ${TARGET_DESC} without moving the cursor.`, + }, + { + command: `${VAR_SPOKEN_FORM} ${TOKEN_SCOPE} ${TARGET}`, + description: `Inserts spaces around the ${TARGET_DESC}.`, + }, + ], }, joinLines: { name: "Join lines", @@ -425,7 +596,12 @@ export const actionReferences: Record< cheatsheet: "Join lines", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Joins the line containing the ${TARGET_DESC} with the following line.`, + }, + ], }, outdentLine: { name: "Outdent line", @@ -437,7 +613,12 @@ export const actionReferences: Record< cheatsheet: "Outdent line", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Decreases the indentation of the line containing the ${TARGET_DESC}.`, + }, + ], }, randomizeTargets: { name: "Randomize targets", @@ -449,11 +630,16 @@ export const actionReferences: Record< cheatsheet: "Randomize targets", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${EVERY_MODIFIER} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + description: `Randomizes the collection items associated with the ${TARGET_DESC}.`, + }, + ], }, remove: { name: "Remove", - defaultSpokenForm: "chuck", + defaultSpokenForm: REMOVE, description: "This action can be used to remove a target without moving the cursor.", syntaxes: [ @@ -480,7 +666,12 @@ export const actionReferences: Record< cheatsheet: "Rename", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Starts renaming the ${TARGET_DESC}.`, + }, + ], }, revealDefinition: { name: "Reveal definition", @@ -492,7 +683,12 @@ export const actionReferences: Record< cheatsheet: "Reveal definition", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Opens the definition of the ${TARGET_DESC}.`, + }, + ], }, revealTypeDefinition: { name: "Reveal type definition", @@ -504,7 +700,12 @@ export const actionReferences: Record< cheatsheet: "Reveal type definition", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Opens the type definition of the ${TARGET_DESC}.`, + }, + ], }, reverseTargets: { name: "Reverse targets", @@ -516,7 +717,12 @@ export const actionReferences: Record< cheatsheet: "Reverse targets", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${EVERY_MODIFIER} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + description: `Reverses the collection items associated with the ${TARGET_DESC}.`, + }, + ], }, scrollToBottom: { name: "Scroll to bottom", @@ -528,7 +734,12 @@ export const actionReferences: Record< cheatsheet: "Scroll to bottom", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Scrolls the ${TARGET_DESC} to the bottom of the viewport.`, + }, + ], }, scrollToCenter: { name: "Scroll to center", @@ -540,7 +751,12 @@ export const actionReferences: Record< cheatsheet: "Scroll to center", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Scrolls the ${TARGET_DESC} to the center of the viewport.`, + }, + ], }, scrollToTop: { name: "Scroll to top", @@ -552,11 +768,16 @@ export const actionReferences: Record< cheatsheet: "Scroll to top", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Scrolls the ${TARGET_DESC} to the top of the viewport.`, + }, + ], }, setSelection: { name: "Set selection", - defaultSpokenForm: SET_SELECTION_SPOKEN_FORM, + defaultSpokenForm: SET_SELECTION, syntaxes: [ { pattern: DEFAULT_PATTERN, @@ -564,7 +785,12 @@ export const actionReferences: Record< cheatsheet: "Set selection", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Selects the ${TARGET_DESC}.`, + }, + ], }, setSelectionAfter: { name: "Set selection after", @@ -576,7 +802,12 @@ export const actionReferences: Record< cheatsheet: "Set selection after", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Places the cursor after the ${TARGET_DESC}.`, + }, + ], }, setSelectionBefore: { name: "Set selection before", @@ -588,7 +819,12 @@ export const actionReferences: Record< cheatsheet: "Set selection before", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Places the cursor before the ${TARGET_DESC}.`, + }, + ], }, showDebugHover: { name: "Show debug hover", @@ -600,7 +836,12 @@ export const actionReferences: Record< cheatsheet: "Show debug hover", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Shows debug information for the ${TARGET_DESC}.`, + }, + ], }, showHover: { name: "Show hover", @@ -612,7 +853,12 @@ export const actionReferences: Record< cheatsheet: "Show hover", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Shows hover information for the ${TARGET_DESC}.`, + }, + ], }, showQuickFix: { name: "Show quick fix", @@ -624,7 +870,12 @@ export const actionReferences: Record< cheatsheet: "Show quick fix", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Shows quick fixes for the ${TARGET_DESC}.`, + }, + ], }, showReferences: { name: "Show references", @@ -636,7 +887,12 @@ export const actionReferences: Record< cheatsheet: "Show references", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Shows references to the ${TARGET_DESC}.`, + }, + ], }, sortTargets: { name: "Sort targets", @@ -648,7 +904,12 @@ export const actionReferences: Record< cheatsheet: "Sort targets", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${EVERY_MODIFIER} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + description: `Sorts the collection items associated with the ${TARGET_DESC}.`, + }, + ], }, toggleLineBreakpoint: { name: "Toggle line/scope breakpoint", @@ -666,7 +927,12 @@ export const actionReferences: Record< cheatsheet: "Toggle inline breakpoint", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Toggles a breakpoint on the line containing the ${TARGET_DESC}.`, + }, + ], }, toggleLineComment: { name: "Toggle line comment", @@ -678,7 +944,12 @@ export const actionReferences: Record< cheatsheet: "Toggle line comment", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Toggles the comment on the line containing the ${TARGET_DESC}.`, + }, + ], }, unfoldRegion: { name: "Unfold region", @@ -690,7 +961,12 @@ export const actionReferences: Record< cheatsheet: "Unfold region", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + description: `Unfolds the function containing the ${TARGET_DESC}.`, + }, + ], }, callAsFunction: { name: "Call as function", @@ -707,7 +983,12 @@ export const actionReferences: Record< cheatsheet: `Insert call to ${VAR_TARGET_1} on ${VAR_TARGET_2}`, }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Inserts a call to the ${TARGET_DESC} at the current selection.`, + }, + ], }, generateSnippet: { name: "Generate snippet", @@ -720,7 +1001,12 @@ export const actionReferences: Record< cheatsheet: "Generate snippet", }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + description: `Generates a snippet from the function containing the ${TARGET_DESC}.`, + }, + ], }, highlight: { name: "Highlight", @@ -732,7 +1018,12 @@ export const actionReferences: Record< cheatsheet: "Highlight", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Highlights the ${TARGET_DESC}.`, + }, + ], }, insertSnippet: { name: "Insert snippet", @@ -744,7 +1035,12 @@ export const actionReferences: Record< cheatsheet: `Insert snippet at ${VAR_DESTINATION}`, }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${VAR_SNIPPET} after ${TARGET}`, + description: `Inserts an if-statement snippet after the ${TARGET_DESC}.`, + }, + ], }, moveToTarget: { name: "Move to target", @@ -761,7 +1057,12 @@ export const actionReferences: Record< cheatsheet: `Move ${VAR_TARGET} to ${VAR_DESTINATION}`, }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${TARGET} after ${TARGET_2}`, + description: `Moves the ${TARGET_DESC} to after the ${TARGET_2_DESC}.`, + }, + ], }, pasteFromClipboard: { name: "Paste from clipboard", @@ -773,7 +1074,12 @@ export const actionReferences: Record< cheatsheet: `Paste from clipboard at ${VAR_DESTINATION}`, }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} after ${TARGET}`, + description: `Pastes the clipboard contents after the ${TARGET_DESC}.`, + }, + ], }, replaceWithTarget: { name: "Replace with target", @@ -790,7 +1096,12 @@ export const actionReferences: Record< cheatsheet: `Copy ${VAR_TARGET} to ${VAR_DESTINATION}`, }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${TARGET} to ${TARGET_2}`, + description: `Replaces the ${TARGET_2_DESC} with a copy of the ${TARGET_DESC}.`, + }, + ], }, rewrapWithPairedDelimiter: { name: "Rewrap with paired delimiter", @@ -802,7 +1113,12 @@ export const actionReferences: Record< cheatsheet: `Rewrap ${VAR_TARGET} with ${VAR_PAIR}`, }, ], - examples: [], + examples: [ + { + command: `curly ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Replaces the paired delimiters around the ${TARGET_DESC} with curly brackets.`, + }, + ], }, swapTargets: { name: "Swap targets", @@ -819,7 +1135,12 @@ export const actionReferences: Record< cheatsheet: `Swap ${VAR_TARGET_1} with ${VAR_TARGET_2}`, }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} ${TARGET} ${connectiveSpokenForms.swapConnective} ${TARGET_2}`, + description: `Swaps the ${TARGET_DESC} and the ${TARGET_2_DESC}.`, + }, + ], }, wrapWithPairedDelimiter: { name: "Wrap with paired delimiter", @@ -831,7 +1152,12 @@ export const actionReferences: Record< cheatsheet: `Wrap ${VAR_TARGET} with ${VAR_PAIR}`, }, ], - examples: [], + examples: [ + { + command: `box ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Wraps the ${TARGET_DESC} in square brackets.`, + }, + ], }, wrapWithSnippet: { name: "Wrap with snippet", @@ -843,7 +1169,12 @@ export const actionReferences: Record< cheatsheet: `Wrap ${VAR_TARGET} with ${VAR_SNIPPET}`, }, ], - examples: [], + examples: [ + { + command: `if ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Wraps the ${TARGET_DESC} in an if-statement snippet.`, + }, + ], }, applyFormatter: { name: "Apply formatter", @@ -855,7 +1186,12 @@ export const actionReferences: Record< cheatsheet: `Reformat ${VAR_TARGET} as ${VAR_FORMATTER}`, }, ], - examples: [], + examples: [ + { + command: `${VAR_SPOKEN_FORM} camel at ${TARGET}`, + description: `Reformats the ${TARGET_DESC} as camel case.`, + }, + ], }, nextHomophone: { name: "Next homophone", @@ -867,7 +1203,12 @@ export const actionReferences: Record< cheatsheet: "Cycle to next homophone", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Replaces the ${TARGET_DESC} with its next homophone.`, + }, + ], }, // Private actions -------------------- @@ -883,7 +1224,12 @@ export const actionReferences: Record< cheatsheet: "Show parse tree", }, ], - examples: [], + examples: [ + { + command: DEFAULT_COMMAND, + description: `Shows the parse tree for the ${TARGET_DESC}.`, + }, + ], }, parsed: { name: "Parsed", diff --git a/packages/lib-common/src/references/constants.ts b/packages/lib-common/src/references/constants.ts new file mode 100644 index 00000000000..9afaa1d88b4 --- /dev/null +++ b/packages/lib-common/src/references/constants.ts @@ -0,0 +1,39 @@ +export const VAR_SPOKEN_FORM = ""; +export const VAR_TARGET = ""; +export const VAR_TARGET_1 = ""; +export const VAR_TARGET_2 = ""; +export const VAR_DESTINATION = ""; +export const VAR_SCOPE = ""; +export const VAR_SNIPPET = ""; +export const VAR_PAIR = ""; +export const VAR_FORMATTER = ""; +export const VAR_NUMBER = ""; +export const VAR_ORDINAL = ""; +export const VAR_MODIFIER = ""; +export const VAR_CHARACTER = ""; + +// Actions +export const SET_SELECTION = "take"; +export const REMOVE = "chuck"; + +// Modifiers +export const EVERY = "every"; +export const EXTEND_THROUGH_END_OF = "past end of"; + +// Scopes +export const LINE = "line"; +export const ITEM = "item"; +export const STATEMENT = "state"; +export const PARENTHESES = "round"; + +// Numbers +export const THREE = "three"; +export const THIRD = "third"; + +// Misc +export const FIRST = "first"; +export const LAST = "last"; +export const NEXT = "next"; +export const PREVIOUS = "previous"; +export const BACKWARD = "backward"; +export const FORWARD = "forward"; diff --git a/packages/lib-common/src/references/modifierReferences.ts b/packages/lib-common/src/references/modifierReferences.ts index 2348da04ba5..20f5c5695ff 100644 --- a/packages/lib-common/src/references/modifierReferences.ts +++ b/packages/lib-common/src/references/modifierReferences.ts @@ -1,25 +1,36 @@ import type { ModifierType } from "../types/command/PartialTargetDescriptor.types"; import type { SpokenFormMapKeyTypes } from "../types/SpokenFormType"; -import type { ReferenceEntry, SpokenFormReference } from "./ReferenceEntry"; import { + BACKWARD, + EVERY, + EXTEND_THROUGH_END_OF, + FIRST, + FORWARD, + ITEM, + LAST, + LINE, + NEXT, + PARENTHESES, + PREVIOUS, + REMOVE, + SET_SELECTION, + STATEMENT, + THIRD, + THREE, VAR_MODIFIER, VAR_NUMBER, VAR_ORDINAL, VAR_SCOPE, VAR_SPOKEN_FORM, -} from "./variables"; +} from "./constants"; +import type { ReferenceEntry, SpokenFormReference } from "./ReferenceEntry"; const DEFAULT_PATTERN = VAR_SPOKEN_FORM; -type AdditionalModifierReferenceType = "ancestor"; +const TARGET = "blue air"; +const TARGET_DESC = "token containing letter 'a' with a blue hat"; -const NEXT = "next"; -const FIRST = "first"; -const LAST = "last"; -const PREVIOUS = "previous"; -const BACKWARD = "backward"; -const FORWARD = "forward"; -const EVERY = "every"; +type AdditionalModifierReferenceType = "ancestor"; export const modifierReferences: Record< ModifierType | AdditionalModifierReferenceType, @@ -35,7 +46,12 @@ export const modifierReferences: Record< cheatsheet: "Empty position at start of target", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Places the cursor at the start of the ${TARGET_DESC}.`, + }, + ], }, endOf: { name: "End of", @@ -47,7 +63,12 @@ export const modifierReferences: Record< cheatsheet: "Empty position at end of target", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Places the cursor at the end of the ${TARGET_DESC}.`, + }, + ], }, interiorOnly: { name: "Interior only", @@ -59,7 +80,12 @@ export const modifierReferences: Record< cheatsheet: "Interior only", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${PARENTHESES} ${TARGET}`, + description: `Selects the contents of the parentheses containing the ${TARGET_DESC}, excluding the parentheses.`, + }, + ], }, excludeInterior: { name: "Exclude interior", @@ -71,7 +97,12 @@ export const modifierReferences: Record< cheatsheet: "Bounding paired delimiters", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${PARENTHESES} ${TARGET}`, + description: `Selects only the parentheses containing the ${TARGET_DESC}.`, + }, + ], }, visible: { name: "Visible", @@ -83,7 +114,13 @@ export const modifierReferences: Record< cheatsheet: "Visible in viewport", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM}`, + description: + "Selects the content currently visible in the editor viewport.", + }, + ], }, containingScope: { name: "Containing scope", @@ -94,7 +131,12 @@ export const modifierReferences: Record< cheatsheet: `Containing instance of ${VAR_SCOPE}`, }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${STATEMENT} ${TARGET}`, + description: `Selects the statement containing the ${TARGET_DESC}.`, + }, + ], }, everyScope: { name: "Every scope", @@ -106,7 +148,12 @@ export const modifierReferences: Record< cheatsheet: `Every instance of ${VAR_SCOPE}`, }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${ITEM} ${TARGET}`, + description: `Selects every item in the map containing the ${TARGET_DESC}.`, + }, + ], }, ancestor: { name: "Ancestor", @@ -118,7 +165,12 @@ export const modifierReferences: Record< cheatsheet: `Grandparent containing instance of ${VAR_SCOPE}`, }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${STATEMENT} ${TARGET}`, + description: `Selects the parent statement of the statement containing the ${TARGET_DESC}.`, + }, + ], }, ordinalScope: { name: "Ordinal scope", @@ -154,7 +206,17 @@ export const modifierReferences: Record< cheatsheet: `Last ${VAR_NUMBER} instances of ${VAR_SCOPE} in iteration scope, as individual targets`, }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${THIRD} ${STATEMENT}`, + description: "Selects the third statement in the iteration scope.", + }, + { + command: `${SET_SELECTION} ${FIRST} ${THREE} ${STATEMENT}s`, + description: + "Selects a contiguous range containing the first three statements in the iteration scope.", + }, + ], }, relativeScope: { name: "Relative scope", @@ -230,7 +292,16 @@ export const modifierReferences: Record< cheatsheet: `Next ${VAR_NUMBER} instances of ${VAR_SCOPE}, as individual targets`, }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${NEXT} ${STATEMENT} ${TARGET}`, + description: `Selects the next statement after the statement containing the ${TARGET_DESC}.`, + }, + { + command: `${SET_SELECTION} ${THREE} ${STATEMENT}s ${BACKWARD} ${TARGET}`, + description: `Selects three statements as a contiguous range, starting at the ${TARGET_DESC} and going backward.`, + }, + ], }, extendThroughStartOf: { name: "Extend through start of", @@ -247,7 +318,12 @@ export const modifierReferences: Record< cheatsheet: `Extend through start of ${VAR_MODIFIER}`, }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects from the ${TARGET_DESC} through the start of its line or surrounding pair.`, + }, + ], }, extendThroughEndOf: { name: "Extend through end of", @@ -264,7 +340,12 @@ export const modifierReferences: Record< cheatsheet: `Extend through end of ${VAR_MODIFIER}`, }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects from the ${TARGET_DESC} through the end of its line or surrounding pair.`, + }, + ], }, leading: { name: "Leading", @@ -276,7 +357,12 @@ export const modifierReferences: Record< cheatsheet: "Leading delimiter range", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${ITEM} ${TARGET}`, + description: `Selects the leading delimiter of the item containing the ${TARGET_DESC}.`, + }, + ], }, trailing: { name: "Trailing", @@ -288,7 +374,12 @@ export const modifierReferences: Record< cheatsheet: "Trailing delimiter range", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${ITEM} ${TARGET}`, + description: `Selects the trailing delimiter of the item containing the ${TARGET_DESC}.`, + }, + ], }, toRawSelection: { name: "Raw selection", @@ -300,7 +391,12 @@ export const modifierReferences: Record< cheatsheet: "No inference", }, ], - examples: [], + examples: [ + { + command: `${REMOVE} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Deletes only the ${TARGET_DESC}, leaving adjacent whitespace unchanged.`, + }, + ], }, keepContentFilter: { name: "Keep content filter", @@ -312,7 +408,13 @@ export const modifierReferences: Record< cheatsheet: "Keep content filter", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM}`, + description: + "Selects only to the nonempty selections when there are multiple selections.", + }, + ], }, keepEmptyFilter: { name: "Keep empty filter", @@ -324,7 +426,13 @@ export const modifierReferences: Record< cheatsheet: "Keep empty filter", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM}`, + description: + "Selects only the empty selections when there are multiple selections.", + }, + ], }, inferPreviousMark: { name: "Infer previous mark", @@ -336,21 +444,18 @@ export const modifierReferences: Record< cheatsheet: "Infer previous mark", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${TARGET} ${EXTEND_THROUGH_END_OF} ${VAR_SPOKEN_FORM} ${LINE}`, + description: `Selects from the ${TARGET_DESC} through the end of the line containing that token.`, + }, + ], }, // Private modifiers, but that has spoken forms preferredScope: { name: "Preferred scope", private: true, - syntaxes: [], - examples: [], - }, - - // Modifiers without spoken forms - modifyIfUntyped: { - name: "Modify if untyped", - private: true, syntaxes: [ { pattern: VAR_SCOPE, @@ -358,6 +463,19 @@ export const modifierReferences: Record< cheatsheet: `Preferred instance of ${VAR_SCOPE}`, }, ], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${ITEM} ${TARGET}`, + description: `Selects the closest item to the ${TARGET_DESC}.`, + }, + ], + }, + + // Modifiers without spoken forms + modifyIfUntyped: { + name: "Modify if untyped", + private: true, + syntaxes: [], examples: [], }, fallback: { diff --git a/packages/lib-common/src/references/scopeReferences.ts b/packages/lib-common/src/references/scopeReferences.ts index 2001f826246..abc2bb8e29e 100644 --- a/packages/lib-common/src/references/scopeReferences.ts +++ b/packages/lib-common/src/references/scopeReferences.ts @@ -1,9 +1,21 @@ import type { ScopeTypeType } from "../types/command/PartialTargetDescriptor.types"; +import { + EVERY, + ITEM, + PARENTHESES, + SET_SELECTION, + STATEMENT, + VAR_CHARACTER, + VAR_PAIR, + VAR_SPOKEN_FORM, +} from "./constants"; import type { ReferenceEntry } from "./ReferenceEntry"; -import { VAR_CHARACTER, VAR_PAIR, VAR_SPOKEN_FORM } from "./variables"; const DEFAULT_PATTERN = VAR_SPOKEN_FORM; +const TARGET = "blue air"; +const TARGET_DESC = "token containing letter 'a' with a blue hat"; + export const scopeReferences: Record = { argumentOrParameter: { name: "Argument or parameter", @@ -15,7 +27,12 @@ export const scopeReferences: Record = { cheatsheet: "Argument", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the argument or parameter containing the ${TARGET_DESC}.`, + }, + ], }, argumentList: { name: "Argument list", @@ -27,7 +44,12 @@ export const scopeReferences: Record = { cheatsheet: "Argument list", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the argument list containing the ${TARGET_DESC}.`, + }, + ], }, anonymousFunction: { name: "Anonymous function", @@ -39,7 +61,12 @@ export const scopeReferences: Record = { cheatsheet: "Anonymous function", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the anonymous function containing the ${TARGET_DESC}.`, + }, + ], }, attribute: { name: "Attribute", @@ -51,7 +78,12 @@ export const scopeReferences: Record = { cheatsheet: "Attribute", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the attribute containing the ${TARGET_DESC}.`, + }, + ], }, branch: { name: "Branch", @@ -63,7 +95,12 @@ export const scopeReferences: Record = { cheatsheet: "Branch", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the branch containing the ${TARGET_DESC}.`, + }, + ], }, class: { name: "Class", @@ -75,7 +112,12 @@ export const scopeReferences: Record = { cheatsheet: "Class", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the class containing the ${TARGET_DESC}.`, + }, + ], }, className: { name: "Class name", @@ -87,11 +129,16 @@ export const scopeReferences: Record = { cheatsheet: "Class name", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the class name containing the ${TARGET_DESC}.`, + }, + ], }, collectionItem: { name: "Collection item", - defaultSpokenForm: "item", + defaultSpokenForm: ITEM, syntaxes: [ { pattern: DEFAULT_PATTERN, @@ -99,7 +146,12 @@ export const scopeReferences: Record = { cheatsheet: "Collection item", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the collection item containing the ${TARGET_DESC}.`, + }, + ], }, collectionKey: { name: "Collection key", @@ -111,7 +163,12 @@ export const scopeReferences: Record = { cheatsheet: "Collection key", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the collection key containing the ${TARGET_DESC}.`, + }, + ], }, comment: { name: "Comment", @@ -123,7 +180,12 @@ export const scopeReferences: Record = { cheatsheet: "Comment", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the comment containing the ${TARGET_DESC}.`, + }, + ], }, functionCall: { name: "Function call", @@ -135,7 +197,12 @@ export const scopeReferences: Record = { cheatsheet: "Function call", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the function call containing the ${TARGET_DESC}.`, + }, + ], }, functionCallee: { name: "Function callee", @@ -147,7 +214,12 @@ export const scopeReferences: Record = { cheatsheet: "Function callee", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the function callee containing the ${TARGET_DESC}.`, + }, + ], }, functionName: { name: "Function name", @@ -159,7 +231,12 @@ export const scopeReferences: Record = { cheatsheet: "Function name", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the function name containing the ${TARGET_DESC}.`, + }, + ], }, ifStatement: { name: "If statement", @@ -171,7 +248,12 @@ export const scopeReferences: Record = { cheatsheet: "If statement", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the if statement containing the ${TARGET_DESC}.`, + }, + ], }, instance: { name: "Instance", @@ -183,7 +265,12 @@ export const scopeReferences: Record = { cheatsheet: "Instance", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${EVERY} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects every instance of the ${TARGET_DESC}.`, + }, + ], }, list: { name: "List", @@ -195,7 +282,12 @@ export const scopeReferences: Record = { cheatsheet: "List", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the list containing the ${TARGET_DESC}.`, + }, + ], }, map: { name: "Map", @@ -207,7 +299,12 @@ export const scopeReferences: Record = { cheatsheet: "Map", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the map containing the ${TARGET_DESC}.`, + }, + ], }, name: { name: "Name", @@ -219,7 +316,12 @@ export const scopeReferences: Record = { cheatsheet: "Name", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the name containing the ${TARGET_DESC}.`, + }, + ], }, namedFunction: { name: "Named function", @@ -231,7 +333,12 @@ export const scopeReferences: Record = { cheatsheet: "Named function", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the named function containing the ${TARGET_DESC}.`, + }, + ], }, regularExpression: { name: "Regular expression", @@ -243,11 +350,16 @@ export const scopeReferences: Record = { cheatsheet: "Regular expression", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the regular expression containing the ${TARGET_DESC}.`, + }, + ], }, statement: { name: "Statement", - defaultSpokenForm: "state", + defaultSpokenForm: STATEMENT, syntaxes: [ { pattern: DEFAULT_PATTERN, @@ -255,7 +367,12 @@ export const scopeReferences: Record = { cheatsheet: "Statement", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the statement containing the ${TARGET_DESC}.`, + }, + ], }, type: { name: "Type", @@ -267,7 +384,12 @@ export const scopeReferences: Record = { cheatsheet: "Type", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the type containing the ${TARGET_DESC}.`, + }, + ], }, value: { name: "Value", @@ -279,7 +401,12 @@ export const scopeReferences: Record = { cheatsheet: "Value", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the value containing the ${TARGET_DESC}.`, + }, + ], }, condition: { name: "Condition", @@ -291,7 +418,12 @@ export const scopeReferences: Record = { cheatsheet: "Condition", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the condition containing the ${TARGET_DESC}.`, + }, + ], }, section: { name: "Section", @@ -303,7 +435,12 @@ export const scopeReferences: Record = { cheatsheet: "Section", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the section containing the ${TARGET_DESC}.`, + }, + ], }, sectionLevelOne: { name: "Section level one", @@ -316,7 +453,12 @@ export const scopeReferences: Record = { cheatsheet: "Section level one", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the section level one containing the ${TARGET_DESC}.`, + }, + ], }, sectionLevelTwo: { name: "Section level two", @@ -329,7 +471,12 @@ export const scopeReferences: Record = { cheatsheet: "Section level two", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the section level two containing the ${TARGET_DESC}.`, + }, + ], }, sectionLevelThree: { name: "Section level three", @@ -342,7 +489,12 @@ export const scopeReferences: Record = { cheatsheet: "Section level three", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the section level three containing the ${TARGET_DESC}.`, + }, + ], }, sectionLevelFour: { name: "Section level four", @@ -355,7 +507,12 @@ export const scopeReferences: Record = { cheatsheet: "Section level four", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the section level four containing the ${TARGET_DESC}.`, + }, + ], }, sectionLevelFive: { name: "Section level five", @@ -368,7 +525,12 @@ export const scopeReferences: Record = { cheatsheet: "Section level five", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the section level five containing the ${TARGET_DESC}.`, + }, + ], }, sectionLevelSix: { name: "Section level six", @@ -381,7 +543,12 @@ export const scopeReferences: Record = { cheatsheet: "Section level six", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the section level six containing the ${TARGET_DESC}.`, + }, + ], }, selector: { name: "Selector", @@ -393,7 +560,12 @@ export const scopeReferences: Record = { cheatsheet: "Selector", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the selector containing the ${TARGET_DESC}.`, + }, + ], }, unit: { name: "Unit", @@ -405,7 +577,12 @@ export const scopeReferences: Record = { cheatsheet: "Unit", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the unit containing the ${TARGET_DESC}.`, + }, + ], }, xmlBothTags: { name: "XML both tags", @@ -417,7 +594,12 @@ export const scopeReferences: Record = { cheatsheet: "XML both tags", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the xml both tags containing the ${TARGET_DESC}.`, + }, + ], }, xmlElement: { name: "XML element", @@ -429,7 +611,12 @@ export const scopeReferences: Record = { cheatsheet: "XML element", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the xml element containing the ${TARGET_DESC}.`, + }, + ], }, xmlEndTag: { name: "XML end tag", @@ -441,7 +628,12 @@ export const scopeReferences: Record = { cheatsheet: "XML end tag", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the xml end tag containing the ${TARGET_DESC}.`, + }, + ], }, xmlStartTag: { name: "XML start tag", @@ -453,7 +645,12 @@ export const scopeReferences: Record = { cheatsheet: "XML start tag", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the xml start tag containing the ${TARGET_DESC}.`, + }, + ], }, part: { name: "Part", @@ -465,7 +662,12 @@ export const scopeReferences: Record = { cheatsheet: "Part", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the part containing the ${TARGET_DESC}.`, + }, + ], }, chapter: { name: "Chapter", @@ -477,7 +679,12 @@ export const scopeReferences: Record = { cheatsheet: "Chapter", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the chapter containing the ${TARGET_DESC}.`, + }, + ], }, subSection: { name: "Subsection", @@ -489,7 +696,12 @@ export const scopeReferences: Record = { cheatsheet: "Subsection", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the subsection containing the ${TARGET_DESC}.`, + }, + ], }, subSubSection: { name: "Subsubsection", @@ -501,7 +713,12 @@ export const scopeReferences: Record = { cheatsheet: "Subsubsection", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the subsubsection containing the ${TARGET_DESC}.`, + }, + ], }, namedParagraph: { name: "Named paragraph", @@ -513,7 +730,12 @@ export const scopeReferences: Record = { cheatsheet: "Named paragraph", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the named paragraph containing the ${TARGET_DESC}.`, + }, + ], }, subParagraph: { name: "Subparagraph", @@ -525,7 +747,12 @@ export const scopeReferences: Record = { cheatsheet: "Subparagraph", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the subparagraph containing the ${TARGET_DESC}.`, + }, + ], }, environment: { name: "Environment", @@ -537,7 +764,12 @@ export const scopeReferences: Record = { cheatsheet: "Environment", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the environment containing the ${TARGET_DESC}.`, + }, + ], }, character: { name: "Character", @@ -549,7 +781,12 @@ export const scopeReferences: Record = { cheatsheet: "Character", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the character containing the ${TARGET_DESC}.`, + }, + ], }, word: { name: "Sub token word", @@ -562,7 +799,12 @@ export const scopeReferences: Record = { cheatsheet: "Sub token word", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the sub token word containing the ${TARGET_DESC}.`, + }, + ], }, token: { name: "Token", @@ -574,7 +816,12 @@ export const scopeReferences: Record = { cheatsheet: "Token", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the token containing the ${TARGET_DESC}.`, + }, + ], }, identifier: { name: "Identifier", @@ -586,7 +833,12 @@ export const scopeReferences: Record = { cheatsheet: "Identifier", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the identifier containing the ${TARGET_DESC}.`, + }, + ], }, line: { name: "Line", @@ -598,7 +850,12 @@ export const scopeReferences: Record = { cheatsheet: "Line", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the line containing the ${TARGET_DESC}.`, + }, + ], }, fullLine: { name: "Full line", @@ -610,7 +867,12 @@ export const scopeReferences: Record = { cheatsheet: "Full line", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the full line containing the ${TARGET_DESC}.`, + }, + ], }, sentence: { name: "Sentence", @@ -622,7 +884,12 @@ export const scopeReferences: Record = { cheatsheet: "Sentence", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the sentence containing the ${TARGET_DESC}.`, + }, + ], }, paragraph: { name: "Paragraph", @@ -634,7 +901,12 @@ export const scopeReferences: Record = { cheatsheet: "Paragraph", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the paragraph containing the ${TARGET_DESC}.`, + }, + ], }, boundedParagraph: { name: "Bounded paragraph", @@ -646,7 +918,12 @@ export const scopeReferences: Record = { cheatsheet: "Paragraph bounded by surrounding pair delimiters", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the bounded paragraph containing the ${TARGET_DESC}.`, + }, + ], }, document: { name: "Document", @@ -658,7 +935,12 @@ export const scopeReferences: Record = { cheatsheet: "Document", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the document containing the ${TARGET_DESC}.`, + }, + ], }, nonWhitespaceSequence: { name: "Non-whitespace sequence", @@ -670,7 +952,12 @@ export const scopeReferences: Record = { cheatsheet: "Non-whitespace sequence", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the non-whitespace sequence containing the ${TARGET_DESC}.`, + }, + ], }, boundedNonWhitespaceSequence: { name: "Bounded non-whitespace sequence", @@ -685,7 +972,12 @@ export const scopeReferences: Record = { "Non-whitespace sequence bounded by surrounding pair delimiters", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the bounded non-whitespace sequence containing the ${TARGET_DESC}.`, + }, + ], }, url: { name: "URL", @@ -697,7 +989,12 @@ export const scopeReferences: Record = { cheatsheet: "URL", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the url containing the ${TARGET_DESC}.`, + }, + ], }, notebookCell: { name: "Notebook cell", @@ -709,7 +1006,12 @@ export const scopeReferences: Record = { cheatsheet: "Notebook cell", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the notebook cell containing the ${TARGET_DESC}.`, + }, + ], }, command: { name: "Command", @@ -721,7 +1023,12 @@ export const scopeReferences: Record = { cheatsheet: "Command", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the command containing the ${TARGET_DESC}.`, + }, + ], }, glyph: { name: "Glyph", @@ -733,7 +1040,12 @@ export const scopeReferences: Record = { cheatsheet: `Instance of single character ${VAR_CHARACTER}`, }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the character indicated by the ${TARGET_DESC}.`, + }, + ], }, surroundingPair: { name: "Surrounding pair", @@ -744,7 +1056,12 @@ export const scopeReferences: Record = { cheatsheet: "Surrounding pair", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${PARENTHESES} ${TARGET}`, + description: `Selects the parentheses containing the ${TARGET_DESC}.`, + }, + ], }, // Private scopes -------------------- @@ -760,7 +1077,12 @@ export const scopeReferences: Record = { cheatsheet: "Field access", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the field access containing the ${TARGET_DESC}.`, + }, + ], }, string: { name: "String", @@ -773,7 +1095,12 @@ export const scopeReferences: Record = { cheatsheet: "String", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the string containing the ${TARGET_DESC}.`, + }, + ], }, textFragment: { name: "Text fragment", @@ -786,7 +1113,12 @@ export const scopeReferences: Record = { cheatsheet: "Text fragment", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the text fragment containing the ${TARGET_DESC}.`, + }, + ], }, disqualifyDelimiter: { name: "Disqualify delimiter", @@ -799,7 +1131,12 @@ export const scopeReferences: Record = { cheatsheet: "Disqualify delimiter", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the disqualify delimiter containing the ${TARGET_DESC}.`, + }, + ], }, pairDelimiter: { name: "Pair delimiter", @@ -812,7 +1149,12 @@ export const scopeReferences: Record = { cheatsheet: "Pair delimiter", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the pair delimiter containing the ${TARGET_DESC}.`, + }, + ], }, interior: { name: "Interior", @@ -825,7 +1167,12 @@ export const scopeReferences: Record = { cheatsheet: "Interior", }, ], - examples: [], + examples: [ + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the interior containing the ${TARGET_DESC}.`, + }, + ], }, surroundingPairInterior: { name: "Surrounding pair interior", diff --git a/packages/lib-common/src/references/variables.ts b/packages/lib-common/src/references/variables.ts deleted file mode 100644 index 305491cedd0..00000000000 --- a/packages/lib-common/src/references/variables.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const VAR_SPOKEN_FORM = ""; -export const VAR_TARGET = ""; -export const VAR_TARGET_1 = ""; -export const VAR_TARGET_2 = ""; -export const VAR_DESTINATION = ""; -export const VAR_SCOPE = ""; -export const VAR_SNIPPET = ""; -export const VAR_PAIR = ""; -export const VAR_FORMATTER = ""; -export const VAR_NUMBER = ""; -export const VAR_ORDINAL = ""; -export const VAR_MODIFIER = ""; -export const VAR_CHARACTER = ""; From 762829411b56ce1f08fa25923c27b5ed7bed1a2e Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 29 Aug 2026 12:38:30 +0200 Subject: [PATCH 2/4] More fixes --- .../app-web-docs/src/docs/user/actions/insertSnippet.mdx | 2 +- packages/app-web-docs/src/docs/user/scopes/glyph.mdx | 2 +- packages/lib-common/src/references/actionReferences.ts | 4 +++- packages/lib-common/src/references/constants.ts | 3 +++ packages/lib-common/src/references/scopeReferences.ts | 6 ++++-- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx b/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx index b86e9a3adeb..440b0ef070a 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx @@ -12,4 +12,4 @@ Default: `snip` ## Examples -- `"snip after blue air"`: Inserts an if-statement snippet after the token containing letter 'a' with a blue hat. +- `"snip if after blue air"`: Inserts an if-statement snippet after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/scopes/glyph.mdx b/packages/app-web-docs/src/docs/user/scopes/glyph.mdx index c479bf0dbf1..283590752db 100644 --- a/packages/app-web-docs/src/docs/user/scopes/glyph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/glyph.mdx @@ -14,6 +14,6 @@ Default: `glyph` ## Examples -- `"take glyph blue air"`: Selects the character indicated by the token containing letter 'a' with a blue hat. +- `"take next glyph air"`: Selects the next 'a'. diff --git a/packages/lib-common/src/references/actionReferences.ts b/packages/lib-common/src/references/actionReferences.ts index 8b3f233d1e6..5d2fa836bdd 100644 --- a/packages/lib-common/src/references/actionReferences.ts +++ b/packages/lib-common/src/references/actionReferences.ts @@ -3,6 +3,7 @@ import { connectiveSpokenForms } from "./connectiveSpokenForms"; import { REMOVE, SET_SELECTION, + SNIPPET_IF, VAR_DESTINATION, VAR_FORMATTER, VAR_PAIR, @@ -34,6 +35,7 @@ const NAMED_FUNCTION_SCOPE = getSpokenForm(scopeReferences.namedFunction); const TOKEN_SCOPE = getSpokenForm(scopeReferences.token); const EVERY_MODIFIER = getSpokenForm(modifierReferences.everyScope); const SWAP_CONNECTIVE = connectiveSpokenForms.swapConnective; +const AFTER = connectiveSpokenForms.after; type TalonSideActionType = "applyFormatter" | "nextHomophone"; @@ -1037,7 +1039,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${VAR_SNIPPET} after ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${SNIPPET_IF} ${AFTER} ${TARGET}`, description: `Inserts an if-statement snippet after the ${TARGET_DESC}.`, }, ], diff --git a/packages/lib-common/src/references/constants.ts b/packages/lib-common/src/references/constants.ts index 9afaa1d88b4..4ad58be10b6 100644 --- a/packages/lib-common/src/references/constants.ts +++ b/packages/lib-common/src/references/constants.ts @@ -31,9 +31,12 @@ export const THREE = "three"; export const THIRD = "third"; // Misc +export const AIR = "air"; + export const FIRST = "first"; export const LAST = "last"; export const NEXT = "next"; export const PREVIOUS = "previous"; export const BACKWARD = "backward"; export const FORWARD = "forward"; +export const SNIPPET_IF = "if"; diff --git a/packages/lib-common/src/references/scopeReferences.ts b/packages/lib-common/src/references/scopeReferences.ts index abc2bb8e29e..49829135866 100644 --- a/packages/lib-common/src/references/scopeReferences.ts +++ b/packages/lib-common/src/references/scopeReferences.ts @@ -1,7 +1,9 @@ import type { ScopeTypeType } from "../types/command/PartialTargetDescriptor.types"; import { + AIR, EVERY, ITEM, + NEXT, PARENTHESES, SET_SELECTION, STATEMENT, @@ -1042,8 +1044,8 @@ export const scopeReferences: Record = { ], examples: [ { - command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, - description: `Selects the character indicated by the ${TARGET_DESC}.`, + command: `${SET_SELECTION} ${NEXT} ${VAR_SPOKEN_FORM} ${AIR}`, + description: `Selects the next 'a'.`, }, ], }, From 22483fc57a2a7ce6d37595ab568d36fb4a8d5efd Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 29 Aug 2026 13:57:54 +0200 Subject: [PATCH 3/4] Move default spoken forms for things like hat colors, shape, graphemes, and so on to commons reference s Please enter the commit message for your changes. Lines starting --- .../src/docs/user/actions/addSelection.mdx | 4 - .../docs/user/actions/addSelectionAfter.mdx | 4 - .../docs/user/actions/addSelectionBefore.mdx | 4 - .../src/docs/user/actions/applyFormatter.mdx | 4 - .../src/docs/user/actions/breakLine.mdx | 4 - .../src/docs/user/actions/callAsFunction.mdx | 4 - .../user/actions/clearAndSetSelection.mdx | 4 - .../src/docs/user/actions/copyToClipboard.mdx | 4 - .../src/docs/user/actions/cutToClipboard.mdx | 4 - .../src/docs/user/actions/decrement.mdx | 4 - .../src/docs/user/actions/deselect.mdx | 4 - .../docs/user/actions/editNewLineAfter.mdx | 5 - .../docs/user/actions/editNewLineBefore.mdx | 5 - .../src/docs/user/actions/extractVariable.mdx | 4 - .../src/docs/user/actions/findInDocument.mdx | 4 - .../src/docs/user/actions/findInWorkspace.mdx | 4 - .../src/docs/user/actions/flashTargets.mdx | 4 - .../src/docs/user/actions/foldRegion.mdx | 4 - .../src/docs/user/actions/followLink.mdx | 4 - .../src/docs/user/actions/followLinkAside.mdx | 4 - .../src/docs/user/actions/generateSnippet.mdx | 4 - .../src/docs/user/actions/gitAccept.mdx | 4 - .../src/docs/user/actions/gitRevert.mdx | 4 - .../src/docs/user/actions/gitStage.mdx | 4 - .../src/docs/user/actions/gitUnstage.mdx | 4 - .../src/docs/user/actions/highlight.mdx | 4 - .../src/docs/user/actions/increment.mdx | 4 - .../src/docs/user/actions/indentLine.mdx | 4 - .../src/docs/user/actions/insertCopyAfter.mdx | 4 - .../docs/user/actions/insertCopyBefore.mdx | 4 - .../user/actions/insertEmptyLineAfter.mdx | 5 - .../user/actions/insertEmptyLineBefore.mdx | 5 - .../user/actions/insertEmptyLinesAround.mdx | 5 - .../src/docs/user/actions/insertSnippet.mdx | 4 - .../src/docs/user/actions/joinLines.mdx | 4 - .../src/docs/user/actions/moveToTarget.mdx | 4 - .../src/docs/user/actions/nextHomophone.mdx | 4 - .../src/docs/user/actions/outdentLine.mdx | 4 - .../docs/user/actions/pasteFromClipboard.mdx | 4 - .../docs/user/actions/randomizeTargets.mdx | 4 - .../src/docs/user/actions/remove.mdx | 4 - .../src/docs/user/actions/rename.mdx | 4 - .../docs/user/actions/replaceWithTarget.mdx | 4 - .../docs/user/actions/revealDefinition.mdx | 4 - .../user/actions/revealTypeDefinition.mdx | 4 - .../src/docs/user/actions/reverseTargets.mdx | 4 - .../actions/rewrapWithPairedDelimiter.mdx | 4 - .../src/docs/user/actions/scrollToBottom.mdx | 4 - .../src/docs/user/actions/scrollToCenter.mdx | 4 - .../src/docs/user/actions/scrollToTop.mdx | 4 - .../user/actions/setInstanceReference.mdx | 4 - .../src/docs/user/actions/setSelection.mdx | 4 - .../docs/user/actions/setSelectionAfter.mdx | 4 - .../docs/user/actions/setSelectionBefore.mdx | 4 - .../src/docs/user/actions/showDebugHover.mdx | 4 - .../src/docs/user/actions/showHover.mdx | 4 - .../src/docs/user/actions/showQuickFix.mdx | 4 - .../src/docs/user/actions/showReferences.mdx | 4 - .../src/docs/user/actions/sortTargets.mdx | 4 - .../src/docs/user/actions/swapTargets.mdx | 4 - .../user/actions/toggleLineBreakpoint.mdx | 4 - .../docs/user/actions/toggleLineComment.mdx | 4 - .../src/docs/user/actions/unfoldRegion.mdx | 4 - .../user/actions/wrapWithPairedDelimiter.mdx | 4 - .../src/docs/user/actions/wrapWithSnippet.mdx | 4 - .../src/docs/user/modifiers/ancestor.mdx | 4 - .../docs/user/modifiers/containingScope.mdx | 4 - .../src/docs/user/modifiers/endOf.mdx | 4 - .../src/docs/user/modifiers/everyScope.mdx | 4 - .../docs/user/modifiers/excludeInterior.mdx | 4 - .../user/modifiers/extendThroughEndOf.mdx | 4 - .../user/modifiers/extendThroughStartOf.mdx | 4 - .../docs/user/modifiers/inferPreviousMark.mdx | 4 - .../src/docs/user/modifiers/interiorOnly.mdx | 4 - .../docs/user/modifiers/keepContentFilter.mdx | 4 - .../docs/user/modifiers/keepEmptyFilter.mdx | 4 - .../src/docs/user/modifiers/leading.mdx | 4 - .../src/docs/user/modifiers/ordinalScope.mdx | 5 - .../src/docs/user/modifiers/relativeScope.mdx | 5 - .../src/docs/user/modifiers/startOf.mdx | 4 - .../docs/user/modifiers/toRawSelection.mdx | 4 - .../src/docs/user/modifiers/trailing.mdx | 4 - .../src/docs/user/modifiers/visible.mdx | 4 - .../docs/user/scopes/anonymousFunction.mdx | 4 - .../src/docs/user/scopes/argumentList.mdx | 4 - .../docs/user/scopes/argumentOrParameter.mdx | 4 - .../src/docs/user/scopes/attribute.mdx | 4 - .../scopes/boundedNonWhitespaceSequence.mdx | 4 - .../src/docs/user/scopes/boundedParagraph.mdx | 4 - .../src/docs/user/scopes/branch.mdx | 4 - .../src/docs/user/scopes/chapter.mdx | 4 - .../src/docs/user/scopes/character.mdx | 4 - .../src/docs/user/scopes/class.mdx | 4 - .../src/docs/user/scopes/className.mdx | 4 - .../src/docs/user/scopes/collectionItem.mdx | 4 - .../src/docs/user/scopes/collectionKey.mdx | 4 - .../src/docs/user/scopes/command.mdx | 4 - .../src/docs/user/scopes/comment.mdx | 4 - .../src/docs/user/scopes/condition.mdx | 4 - .../src/docs/user/scopes/document.mdx | 4 - .../src/docs/user/scopes/environment.mdx | 4 - .../src/docs/user/scopes/fullLine.mdx | 4 - .../src/docs/user/scopes/functionCall.mdx | 4 - .../src/docs/user/scopes/functionCallee.mdx | 4 - .../src/docs/user/scopes/functionName.mdx | 4 - .../src/docs/user/scopes/glyph.mdx | 4 - .../src/docs/user/scopes/identifier.mdx | 4 - .../src/docs/user/scopes/ifStatement.mdx | 4 - .../src/docs/user/scopes/instance.mdx | 4 - .../src/docs/user/scopes/line.mdx | 4 - .../src/docs/user/scopes/list.mdx | 4 - .../app-web-docs/src/docs/user/scopes/map.mdx | 4 - .../src/docs/user/scopes/name.mdx | 4 - .../src/docs/user/scopes/namedFunction.mdx | 4 - .../src/docs/user/scopes/namedParagraph.mdx | 4 - .../user/scopes/nonWhitespaceSequence.mdx | 4 - .../src/docs/user/scopes/notebookCell.mdx | 4 - .../src/docs/user/scopes/paragraph.mdx | 4 - .../src/docs/user/scopes/part.mdx | 4 - .../docs/user/scopes/regularExpression.mdx | 4 - .../src/docs/user/scopes/section.mdx | 4 - .../src/docs/user/scopes/sectionLevelFive.mdx | 4 - .../src/docs/user/scopes/sectionLevelFour.mdx | 4 - .../src/docs/user/scopes/sectionLevelOne.mdx | 4 - .../src/docs/user/scopes/sectionLevelSix.mdx | 4 - .../docs/user/scopes/sectionLevelThree.mdx | 4 - .../src/docs/user/scopes/sectionLevelTwo.mdx | 4 - .../src/docs/user/scopes/selector.mdx | 4 - .../src/docs/user/scopes/sentence.mdx | 4 - .../src/docs/user/scopes/statement.mdx | 4 - .../src/docs/user/scopes/subParagraph.mdx | 4 - .../src/docs/user/scopes/subSection.mdx | 4 - .../src/docs/user/scopes/subSubSection.mdx | 4 - .../src/docs/user/scopes/surroundingPair.mdx | 4 - .../src/docs/user/scopes/token.mdx | 4 - .../src/docs/user/scopes/type.mdx | 4 - .../src/docs/user/scopes/unit.mdx | 4 - .../app-web-docs/src/docs/user/scopes/url.mdx | 4 - .../src/docs/user/scopes/value.mdx | 4 - .../src/docs/user/scopes/word.mdx | 4 - .../src/docs/user/scopes/xmlBothTags.mdx | 4 - .../src/docs/user/scopes/xmlElement.mdx | 4 - .../src/docs/user/scopes/xmlEndTag.mdx | 4 - .../src/docs/user/scopes/xmlStartTag.mdx | 4 - .../src/references/actionReferences.ts | 100 +++++++------ .../lib-common/src/references/constants.ts | 27 ++-- packages/lib-common/src/references/index.ts | 6 +- .../src/references/modifierReferences.ts | 81 +++-------- .../references/pairedDelimiterReferences.ts | 67 +++++++++ .../src/references/scopeReferences.ts | 16 ++- .../connectiveDefaultSpokenForms.ts} | 7 +- .../graphemeDefaultSpokenForms.ts} | 51 +++++-- .../spokenForms/markDefaultSpokenForms.ts | 52 +++++++ .../spokenForms/numberDefaultSpokenForms.ts | 126 ++++++++++++++++ .../src/customCommandGrammar/lexer.ts | 8 +- .../defaultSpokenForms/marks.ts | 60 +------- .../defaultSpokenForms/numbers.ts | 134 +----------------- .../generateSpokenForm/generateSpokenForm.ts | 14 +- .../generateSpokenForm/getRangeConnective.ts | 12 +- .../primitiveTargetToSpokenForm.ts | 31 ++-- .../spokenForms/defaultSpokenFormMapCore.ts | 102 +++++++++---- .../src/updateReferenceMdx.ts | 22 +-- 162 files changed, 523 insertions(+), 976 deletions(-) create mode 100644 packages/lib-common/src/references/pairedDelimiterReferences.ts rename packages/lib-common/src/references/{connectiveSpokenForms.ts => spokenForms/connectiveDefaultSpokenForms.ts} (80%) rename packages/{lib-engine/src/spokenForms/graphemes.ts => lib-common/src/references/spokenForms/graphemeDefaultSpokenForms.ts} (60%) create mode 100644 packages/lib-common/src/references/spokenForms/markDefaultSpokenForms.ts create mode 100644 packages/lib-common/src/references/spokenForms/numberDefaultSpokenForms.ts diff --git a/packages/app-web-docs/src/docs/user/actions/addSelection.mdx b/packages/app-web-docs/src/docs/user/actions/addSelection.mdx index 4955300700c..2ef5495c62e 100644 --- a/packages/app-web-docs/src/docs/user/actions/addSelection.mdx +++ b/packages/app-web-docs/src/docs/user/actions/addSelection.mdx @@ -9,7 +9,3 @@ Default: `append` ## Syntax - append ``: Adds `` to the current selection set. - -## Examples - -- `"append blue air"`: Adds the token containing letter 'a' with a blue hat to the current selections. diff --git a/packages/app-web-docs/src/docs/user/actions/addSelectionAfter.mdx b/packages/app-web-docs/src/docs/user/actions/addSelectionAfter.mdx index 648bd030fa8..091b51f8fb2 100644 --- a/packages/app-web-docs/src/docs/user/actions/addSelectionAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/addSelectionAfter.mdx @@ -9,7 +9,3 @@ Default: `append post` ## Syntax - append post ``: Adds empty selection after `` to the current selection set. - -## Examples - -- `"append post blue air"`: Adds an empty selection after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/addSelectionBefore.mdx b/packages/app-web-docs/src/docs/user/actions/addSelectionBefore.mdx index c4a72ff5a20..5e172dc0d23 100644 --- a/packages/app-web-docs/src/docs/user/actions/addSelectionBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/addSelectionBefore.mdx @@ -9,7 +9,3 @@ Default: `append pre` ## Syntax - append pre ``: Adds empty selection before `` to the current selection set. - -## Examples - -- `"append pre blue air"`: Adds an empty selection before the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/applyFormatter.mdx b/packages/app-web-docs/src/docs/user/actions/applyFormatter.mdx index d11ebe9d605..eaa31b399e0 100644 --- a/packages/app-web-docs/src/docs/user/actions/applyFormatter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/applyFormatter.mdx @@ -9,7 +9,3 @@ Default: `format` ## Syntax - format `` at ``: Reformat `` as ``. - -## Examples - -- `"format camel at blue air"`: Reformats the token containing letter 'a' with a blue hat as camel case. diff --git a/packages/app-web-docs/src/docs/user/actions/breakLine.mdx b/packages/app-web-docs/src/docs/user/actions/breakLine.mdx index ea5025703f8..14e970b1777 100644 --- a/packages/app-web-docs/src/docs/user/actions/breakLine.mdx +++ b/packages/app-web-docs/src/docs/user/actions/breakLine.mdx @@ -9,7 +9,3 @@ Default: `break` ## Syntax - break ``: Breaks the line before ``. - -## Examples - -- `"break blue air"`: Breaks the line before the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/callAsFunction.mdx b/packages/app-web-docs/src/docs/user/actions/callAsFunction.mdx index f4118d91291..ad44ceedaca 100644 --- a/packages/app-web-docs/src/docs/user/actions/callAsFunction.mdx +++ b/packages/app-web-docs/src/docs/user/actions/callAsFunction.mdx @@ -10,7 +10,3 @@ Default: `call` - call ``: Insert call to `` on selection. - call `` on ``: Insert call to `` on ``. - -## Examples - -- `"call blue air"`: Inserts a call to the token containing letter 'a' with a blue hat at the current selection. diff --git a/packages/app-web-docs/src/docs/user/actions/clearAndSetSelection.mdx b/packages/app-web-docs/src/docs/user/actions/clearAndSetSelection.mdx index a48ba64bf35..6a58fc92420 100644 --- a/packages/app-web-docs/src/docs/user/actions/clearAndSetSelection.mdx +++ b/packages/app-web-docs/src/docs/user/actions/clearAndSetSelection.mdx @@ -10,7 +10,3 @@ Legacy: `clear` ## Syntax - change ``: Change `` by clearing it and leaving the cursor in its place. - -## Examples - -- `"change blue air"`: Deletes the token containing letter 'a' with a blue hat and leaves the cursor in its place. diff --git a/packages/app-web-docs/src/docs/user/actions/copyToClipboard.mdx b/packages/app-web-docs/src/docs/user/actions/copyToClipboard.mdx index 2fab67a9ea7..7ed55fd5156 100644 --- a/packages/app-web-docs/src/docs/user/actions/copyToClipboard.mdx +++ b/packages/app-web-docs/src/docs/user/actions/copyToClipboard.mdx @@ -9,7 +9,3 @@ Default: `copy` ## Syntax - copy ``: Copy `` to clipboard. - -## Examples - -- `"copy blue air"`: Copies the token containing letter 'a' with a blue hat to the clipboard. diff --git a/packages/app-web-docs/src/docs/user/actions/cutToClipboard.mdx b/packages/app-web-docs/src/docs/user/actions/cutToClipboard.mdx index 2ef9b4ffbf2..f07c6a76cb1 100644 --- a/packages/app-web-docs/src/docs/user/actions/cutToClipboard.mdx +++ b/packages/app-web-docs/src/docs/user/actions/cutToClipboard.mdx @@ -9,7 +9,3 @@ Default: `carve` ## Syntax - carve ``: Cut `` to clipboard. - -## Examples - -- `"carve blue air"`: Cuts the token containing letter 'a' with a blue hat to the clipboard. diff --git a/packages/app-web-docs/src/docs/user/actions/decrement.mdx b/packages/app-web-docs/src/docs/user/actions/decrement.mdx index c337fdcc800..94bd0ebc64d 100644 --- a/packages/app-web-docs/src/docs/user/actions/decrement.mdx +++ b/packages/app-web-docs/src/docs/user/actions/decrement.mdx @@ -9,7 +9,3 @@ Default: `decrement` ## Syntax - decrement ``: Decrement number at ``. - -## Examples - -- `"decrement blue air"`: Decrements the number at the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/deselect.mdx b/packages/app-web-docs/src/docs/user/actions/deselect.mdx index a81e7306a38..4893b2d597e 100644 --- a/packages/app-web-docs/src/docs/user/actions/deselect.mdx +++ b/packages/app-web-docs/src/docs/user/actions/deselect.mdx @@ -9,7 +9,3 @@ Default: `give` ## Syntax - give ``: Deselect ``. - -## Examples - -- `"give blue air"`: Removes the token containing letter 'a' with a blue hat from the current selections. diff --git a/packages/app-web-docs/src/docs/user/actions/editNewLineAfter.mdx b/packages/app-web-docs/src/docs/user/actions/editNewLineAfter.mdx index 023b43157dd..1c7e3550f76 100644 --- a/packages/app-web-docs/src/docs/user/actions/editNewLineAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/editNewLineAfter.mdx @@ -12,8 +12,3 @@ Default: `pour` - pour ``: Edit new line after ``. - pour `` ``: Edit new `` after ``. - -## Examples - -- `"pour blue air"`: Inserts a new line below the token containing letter 'a' with a blue hat and moves the cursor to it. -- `"pour item blue air"`: Inserts the delimiters for a new collection item after the item containing the token containing letter 'a' with a blue hat and moves the cursor there. diff --git a/packages/app-web-docs/src/docs/user/actions/editNewLineBefore.mdx b/packages/app-web-docs/src/docs/user/actions/editNewLineBefore.mdx index bab048030d2..8f75f65a372 100644 --- a/packages/app-web-docs/src/docs/user/actions/editNewLineBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/editNewLineBefore.mdx @@ -12,8 +12,3 @@ Default: `drink` - drink ``: Edit new line before ``. - drink `` ``: Edit new `` before ``. - -## Examples - -- `"drink blue air"`: Inserts a new line above the token containing letter 'a' with a blue hat and moves the cursor to it. -- `"drink item blue air"`: Inserts the delimiters for a new collection item before the item containing the token containing letter 'a' with a blue hat and moves the cursor there. diff --git a/packages/app-web-docs/src/docs/user/actions/extractVariable.mdx b/packages/app-web-docs/src/docs/user/actions/extractVariable.mdx index 79dd3f6014d..fbbb8dcabfd 100644 --- a/packages/app-web-docs/src/docs/user/actions/extractVariable.mdx +++ b/packages/app-web-docs/src/docs/user/actions/extractVariable.mdx @@ -9,7 +9,3 @@ Default: `extract` ## Syntax - extract ``: Extract variable from ``. - -## Examples - -- `"extract call blue air"`: Extracts the function call containing the token containing letter 'a' with a blue hat into a variable. diff --git a/packages/app-web-docs/src/docs/user/actions/findInDocument.mdx b/packages/app-web-docs/src/docs/user/actions/findInDocument.mdx index 19a6023012b..5fa853c7835 100644 --- a/packages/app-web-docs/src/docs/user/actions/findInDocument.mdx +++ b/packages/app-web-docs/src/docs/user/actions/findInDocument.mdx @@ -9,7 +9,3 @@ Default: `scout` ## Syntax - scout ``: Find `` in document. - -## Examples - -- `"scout blue air"`: Searches the current document for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/findInWorkspace.mdx b/packages/app-web-docs/src/docs/user/actions/findInWorkspace.mdx index 0e6fb42c366..2a9948cb68c 100644 --- a/packages/app-web-docs/src/docs/user/actions/findInWorkspace.mdx +++ b/packages/app-web-docs/src/docs/user/actions/findInWorkspace.mdx @@ -9,7 +9,3 @@ Default: `scout all` ## Syntax - scout all ``: Find `` in workspace. - -## Examples - -- `"scout all blue air"`: Searches the workspace for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/flashTargets.mdx b/packages/app-web-docs/src/docs/user/actions/flashTargets.mdx index 3a9452ec5df..5d31ef21231 100644 --- a/packages/app-web-docs/src/docs/user/actions/flashTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/flashTargets.mdx @@ -9,7 +9,3 @@ Default: `flash` ## Syntax - flash ``: Flash ``. - -## Examples - -- `"flash blue air"`: Briefly flashes the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/foldRegion.mdx b/packages/app-web-docs/src/docs/user/actions/foldRegion.mdx index e134b331f92..d5530033318 100644 --- a/packages/app-web-docs/src/docs/user/actions/foldRegion.mdx +++ b/packages/app-web-docs/src/docs/user/actions/foldRegion.mdx @@ -9,7 +9,3 @@ Default: `fold` ## Syntax - fold ``: Fold region at ``. - -## Examples - -- `"fold funk blue air"`: Folds the function containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/followLink.mdx b/packages/app-web-docs/src/docs/user/actions/followLink.mdx index f50c100bc79..30ff29d1a54 100644 --- a/packages/app-web-docs/src/docs/user/actions/followLink.mdx +++ b/packages/app-web-docs/src/docs/user/actions/followLink.mdx @@ -9,7 +9,3 @@ Default: `follow` ## Syntax - follow ``: Follow link at ``. - -## Examples - -- `"follow blue air"`: Opens the link containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/followLinkAside.mdx b/packages/app-web-docs/src/docs/user/actions/followLinkAside.mdx index 5fee9a0eca3..52517997f1c 100644 --- a/packages/app-web-docs/src/docs/user/actions/followLinkAside.mdx +++ b/packages/app-web-docs/src/docs/user/actions/followLinkAside.mdx @@ -9,7 +9,3 @@ Default: `follow split` ## Syntax - follow split ``: Follow link at `` aside (e.g. in a split view). - -## Examples - -- `"follow split blue air"`: Opens the link containing the token containing letter 'a' with a blue hat in a split view. diff --git a/packages/app-web-docs/src/docs/user/actions/generateSnippet.mdx b/packages/app-web-docs/src/docs/user/actions/generateSnippet.mdx index 57f7d45d2ce..2fbbc643249 100644 --- a/packages/app-web-docs/src/docs/user/actions/generateSnippet.mdx +++ b/packages/app-web-docs/src/docs/user/actions/generateSnippet.mdx @@ -10,7 +10,3 @@ Legacy: `snippet make` ## Syntax - snip make ``: Generate snippet from ``. - -## Examples - -- `"snip make funk blue air"`: Generates a snippet from the function containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/gitAccept.mdx b/packages/app-web-docs/src/docs/user/actions/gitAccept.mdx index 645d0a71fed..f4332d73e0f 100644 --- a/packages/app-web-docs/src/docs/user/actions/gitAccept.mdx +++ b/packages/app-web-docs/src/docs/user/actions/gitAccept.mdx @@ -9,7 +9,3 @@ Default: `git accept` ## Syntax - git accept ``: Accept Git change at ``. - -## Examples - -- `"git accept blue air"`: Accepts the Git change on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/gitRevert.mdx b/packages/app-web-docs/src/docs/user/actions/gitRevert.mdx index a3d85b5c2b2..f36385c572a 100644 --- a/packages/app-web-docs/src/docs/user/actions/gitRevert.mdx +++ b/packages/app-web-docs/src/docs/user/actions/gitRevert.mdx @@ -9,7 +9,3 @@ Default: `git revert` ## Syntax - git revert ``: Revert Git change at ``. - -## Examples - -- `"git revert blue air"`: Reverts the Git change on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/gitStage.mdx b/packages/app-web-docs/src/docs/user/actions/gitStage.mdx index a351e1e05c5..89be47315d7 100644 --- a/packages/app-web-docs/src/docs/user/actions/gitStage.mdx +++ b/packages/app-web-docs/src/docs/user/actions/gitStage.mdx @@ -9,7 +9,3 @@ Default: `git stage` ## Syntax - git stage ``: Stage Git change at ``. - -## Examples - -- `"git stage blue air"`: Stages the Git change on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/gitUnstage.mdx b/packages/app-web-docs/src/docs/user/actions/gitUnstage.mdx index 1db746d7a4c..2f5459c30ae 100644 --- a/packages/app-web-docs/src/docs/user/actions/gitUnstage.mdx +++ b/packages/app-web-docs/src/docs/user/actions/gitUnstage.mdx @@ -9,7 +9,3 @@ Default: `git unstage` ## Syntax - git unstage ``: Unstage Git change at ``. - -## Examples - -- `"git unstage blue air"`: Unstages the Git change on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/highlight.mdx b/packages/app-web-docs/src/docs/user/actions/highlight.mdx index c66ffa333f5..f1f6ec0edc7 100644 --- a/packages/app-web-docs/src/docs/user/actions/highlight.mdx +++ b/packages/app-web-docs/src/docs/user/actions/highlight.mdx @@ -9,7 +9,3 @@ Default: `highlight` ## Syntax - highlight ``: Highlight ``. - -## Examples - -- `"highlight blue air"`: Highlights the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/increment.mdx b/packages/app-web-docs/src/docs/user/actions/increment.mdx index e730f7ecf50..eb315f8df25 100644 --- a/packages/app-web-docs/src/docs/user/actions/increment.mdx +++ b/packages/app-web-docs/src/docs/user/actions/increment.mdx @@ -9,7 +9,3 @@ Default: `increment` ## Syntax - increment ``: Increment number at ``. - -## Examples - -- `"increment blue air"`: Increments the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/indentLine.mdx b/packages/app-web-docs/src/docs/user/actions/indentLine.mdx index 594f18903f0..48437ec929b 100644 --- a/packages/app-web-docs/src/docs/user/actions/indentLine.mdx +++ b/packages/app-web-docs/src/docs/user/actions/indentLine.mdx @@ -9,7 +9,3 @@ Default: `indent` ## Syntax - indent ``: Indent line containing ``. - -## Examples - -- `"indent blue air"`: Indents the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/insertCopyAfter.mdx b/packages/app-web-docs/src/docs/user/actions/insertCopyAfter.mdx index f78fb824014..04a331ad6ef 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertCopyAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertCopyAfter.mdx @@ -9,7 +9,3 @@ Default: `clone` ## Syntax - clone ``: Insert copy after ``. - -## Examples - -- `"clone funk blue air"`: Inserts a copy of the function containing the token containing letter 'a' with a blue hat after itself. diff --git a/packages/app-web-docs/src/docs/user/actions/insertCopyBefore.mdx b/packages/app-web-docs/src/docs/user/actions/insertCopyBefore.mdx index 47aa0fcfb5b..c605b362aa9 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertCopyBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertCopyBefore.mdx @@ -9,7 +9,3 @@ Default: `clone up` ## Syntax - clone up ``: Insert copy before ``. - -## Examples - -- `"clone up funk blue air"`: Inserts a copy of the function containing the token containing letter 'a' with a blue hat before itself. diff --git a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx index 3c969c7a5a0..a102210e612 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx @@ -9,8 +9,3 @@ Default: `float` ## Syntax - float ``: Insert empty line after ``. - -## Examples - -- `"float blue air"`: Inserts an empty line below the token containing letter 'a' with a blue hat without moving the cursor. -- `"float item blue air"`: Inserts the required delimiter after the collection item containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx index 3a13300583e..4e692773ffa 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx @@ -9,8 +9,3 @@ Default: `drop` ## Syntax - drop ``: Insert empty line before ``. - -## Examples - -- `"drop blue air"`: Inserts an empty line above the token containing letter 'a' with a blue hat without moving the cursor. -- `"drop item blue air"`: Inserts the required delimiter before the collection item containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx b/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx index 3d3d5d0d7c9..6fee99b7418 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx @@ -9,8 +9,3 @@ Default: `puff` ## Syntax - puff ``: Insert empty lines around ``. - -## Examples - -- `"puff blue air"`: Inserts empty lines around the line containing the token containing letter 'a' with a blue hat without moving the cursor. -- `"puff token blue air"`: Inserts spaces around the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx b/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx index 440b0ef070a..4918224159f 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertSnippet.mdx @@ -9,7 +9,3 @@ Default: `snip` ## Syntax - snip `` ``: Insert snippet at ``. - -## Examples - -- `"snip if after blue air"`: Inserts an if-statement snippet after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/joinLines.mdx b/packages/app-web-docs/src/docs/user/actions/joinLines.mdx index da549c32fd5..705270bcd57 100644 --- a/packages/app-web-docs/src/docs/user/actions/joinLines.mdx +++ b/packages/app-web-docs/src/docs/user/actions/joinLines.mdx @@ -9,7 +9,3 @@ Default: `join` ## Syntax - join ``: Join lines at ``. - -## Examples - -- `"join blue air"`: Joins the line containing the token containing letter 'a' with a blue hat with the following line. diff --git a/packages/app-web-docs/src/docs/user/actions/moveToTarget.mdx b/packages/app-web-docs/src/docs/user/actions/moveToTarget.mdx index 49b6f3872dc..8520895b34d 100644 --- a/packages/app-web-docs/src/docs/user/actions/moveToTarget.mdx +++ b/packages/app-web-docs/src/docs/user/actions/moveToTarget.mdx @@ -10,7 +10,3 @@ Default: `move` - move ``: Move `` to selection. - move `` ``: Move `` to ``. - -## Examples - -- `"move blue air after green bat"`: Moves the token containing letter 'a' with a blue hat to after the token containing letter 'b' with a green hat. diff --git a/packages/app-web-docs/src/docs/user/actions/nextHomophone.mdx b/packages/app-web-docs/src/docs/user/actions/nextHomophone.mdx index 00c3482fa5b..d4cf8a9e822 100644 --- a/packages/app-web-docs/src/docs/user/actions/nextHomophone.mdx +++ b/packages/app-web-docs/src/docs/user/actions/nextHomophone.mdx @@ -9,7 +9,3 @@ Default: `phones` ## Syntax - phones ``: Cycle to next homophone for ``. - -## Examples - -- `"phones blue air"`: Replaces the token containing letter 'a' with a blue hat with its next homophone. diff --git a/packages/app-web-docs/src/docs/user/actions/outdentLine.mdx b/packages/app-web-docs/src/docs/user/actions/outdentLine.mdx index a100766af24..c84db27f074 100644 --- a/packages/app-web-docs/src/docs/user/actions/outdentLine.mdx +++ b/packages/app-web-docs/src/docs/user/actions/outdentLine.mdx @@ -9,7 +9,3 @@ Default: `dedent` ## Syntax - dedent ``: Outdent line containing ``. - -## Examples - -- `"dedent blue air"`: Decreases the indentation of the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/pasteFromClipboard.mdx b/packages/app-web-docs/src/docs/user/actions/pasteFromClipboard.mdx index dd01d90cc47..59da8e93ea0 100644 --- a/packages/app-web-docs/src/docs/user/actions/pasteFromClipboard.mdx +++ b/packages/app-web-docs/src/docs/user/actions/pasteFromClipboard.mdx @@ -9,7 +9,3 @@ Default: `paste` ## Syntax - paste ``: Paste from clipboard at ``. - -## Examples - -- `"paste after blue air"`: Pastes the clipboard contents after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/randomizeTargets.mdx b/packages/app-web-docs/src/docs/user/actions/randomizeTargets.mdx index 52b7817073d..68ee22b054e 100644 --- a/packages/app-web-docs/src/docs/user/actions/randomizeTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/randomizeTargets.mdx @@ -9,7 +9,3 @@ Default: `shuffle` ## Syntax - shuffle ``: Randomize ``s. - -## Examples - -- `"shuffle every item blue air"`: Randomizes the collection items associated with the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/remove.mdx b/packages/app-web-docs/src/docs/user/actions/remove.mdx index 7eb95915ec8..4834da3e064 100644 --- a/packages/app-web-docs/src/docs/user/actions/remove.mdx +++ b/packages/app-web-docs/src/docs/user/actions/remove.mdx @@ -11,7 +11,3 @@ Default: `chuck` ## Syntax - chuck ``: Remove ``. - -## Examples - -- `"chuck blue air"`: Removes the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/rename.mdx b/packages/app-web-docs/src/docs/user/actions/rename.mdx index 21eee66011b..b0594228a67 100644 --- a/packages/app-web-docs/src/docs/user/actions/rename.mdx +++ b/packages/app-web-docs/src/docs/user/actions/rename.mdx @@ -9,7 +9,3 @@ Default: `rename` ## Syntax - rename ``: Rename ``. - -## Examples - -- `"rename blue air"`: Starts renaming the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/replaceWithTarget.mdx b/packages/app-web-docs/src/docs/user/actions/replaceWithTarget.mdx index c63e7fa29fb..f66b2a78d58 100644 --- a/packages/app-web-docs/src/docs/user/actions/replaceWithTarget.mdx +++ b/packages/app-web-docs/src/docs/user/actions/replaceWithTarget.mdx @@ -10,7 +10,3 @@ Default: `bring` - bring ``: Insert copy of `` at selection. - bring `` ``: Copy `` to ``. - -## Examples - -- `"bring blue air to green bat"`: Replaces the token containing letter 'b' with a green hat with a copy of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/revealDefinition.mdx b/packages/app-web-docs/src/docs/user/actions/revealDefinition.mdx index e8727c48ae0..3e5c3f45887 100644 --- a/packages/app-web-docs/src/docs/user/actions/revealDefinition.mdx +++ b/packages/app-web-docs/src/docs/user/actions/revealDefinition.mdx @@ -9,7 +9,3 @@ Default: `define` ## Syntax - define ``: Reveal definition of ``. - -## Examples - -- `"define blue air"`: Opens the definition of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/revealTypeDefinition.mdx b/packages/app-web-docs/src/docs/user/actions/revealTypeDefinition.mdx index 1f58487ef11..551d95e992d 100644 --- a/packages/app-web-docs/src/docs/user/actions/revealTypeDefinition.mdx +++ b/packages/app-web-docs/src/docs/user/actions/revealTypeDefinition.mdx @@ -9,7 +9,3 @@ Default: `type deaf` ## Syntax - type deaf ``: Reveal type definition of ``. - -## Examples - -- `"type deaf blue air"`: Opens the type definition of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/reverseTargets.mdx b/packages/app-web-docs/src/docs/user/actions/reverseTargets.mdx index 0dfdf181a60..9d4f4b643e0 100644 --- a/packages/app-web-docs/src/docs/user/actions/reverseTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/reverseTargets.mdx @@ -9,7 +9,3 @@ Default: `reverse` ## Syntax - reverse ``: Reverse ``s. - -## Examples - -- `"reverse every item blue air"`: Reverses the collection items associated with the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/rewrapWithPairedDelimiter.mdx b/packages/app-web-docs/src/docs/user/actions/rewrapWithPairedDelimiter.mdx index e7534e0f196..28410df99f0 100644 --- a/packages/app-web-docs/src/docs/user/actions/rewrapWithPairedDelimiter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/rewrapWithPairedDelimiter.mdx @@ -9,7 +9,3 @@ Default: `repack` ## Syntax - `` repack ``: Rewrap `` with ``. - -## Examples - -- `"curly repack blue air"`: Replaces the paired delimiters around the token containing letter 'a' with a blue hat with curly brackets. diff --git a/packages/app-web-docs/src/docs/user/actions/scrollToBottom.mdx b/packages/app-web-docs/src/docs/user/actions/scrollToBottom.mdx index fc8193f8534..fea3f9e0409 100644 --- a/packages/app-web-docs/src/docs/user/actions/scrollToBottom.mdx +++ b/packages/app-web-docs/src/docs/user/actions/scrollToBottom.mdx @@ -9,7 +9,3 @@ Default: `bottom` ## Syntax - bottom ``: Scroll `` to bottom of the viewport. - -## Examples - -- `"bottom blue air"`: Scrolls the token containing letter 'a' with a blue hat to the bottom of the viewport. diff --git a/packages/app-web-docs/src/docs/user/actions/scrollToCenter.mdx b/packages/app-web-docs/src/docs/user/actions/scrollToCenter.mdx index 0bdd0887eba..4c63dd8a87c 100644 --- a/packages/app-web-docs/src/docs/user/actions/scrollToCenter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/scrollToCenter.mdx @@ -9,7 +9,3 @@ Default: `center` ## Syntax - center ``: Scroll `` to center of the viewport. - -## Examples - -- `"center blue air"`: Scrolls the token containing letter 'a' with a blue hat to the center of the viewport. diff --git a/packages/app-web-docs/src/docs/user/actions/scrollToTop.mdx b/packages/app-web-docs/src/docs/user/actions/scrollToTop.mdx index 78e9f581bc0..8f1a7f973ee 100644 --- a/packages/app-web-docs/src/docs/user/actions/scrollToTop.mdx +++ b/packages/app-web-docs/src/docs/user/actions/scrollToTop.mdx @@ -9,7 +9,3 @@ Default: `crown` ## Syntax - crown ``: Scroll `` to top of the viewport. - -## Examples - -- `"crown blue air"`: Scrolls the token containing letter 'a' with a blue hat to the top of the viewport. diff --git a/packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx b/packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx index 7c3420ed849..c9321d93cad 100644 --- a/packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx +++ b/packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx @@ -11,7 +11,3 @@ Default: `from` ## Syntax - from ``: Set instance reference to ``. - -## Examples - -- `"from funk blue air take every instance green bat"`: Selects every instance of the token containing letter 'b' with a green hat within the function containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/setSelection.mdx b/packages/app-web-docs/src/docs/user/actions/setSelection.mdx index 7b1efebc201..70b9e362bd4 100644 --- a/packages/app-web-docs/src/docs/user/actions/setSelection.mdx +++ b/packages/app-web-docs/src/docs/user/actions/setSelection.mdx @@ -9,7 +9,3 @@ Default: `take` ## Syntax - take ``: Set selection to ``. - -## Examples - -- `"take blue air"`: Selects the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/setSelectionAfter.mdx b/packages/app-web-docs/src/docs/user/actions/setSelectionAfter.mdx index c0084042a36..6336804ff6d 100644 --- a/packages/app-web-docs/src/docs/user/actions/setSelectionAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/setSelectionAfter.mdx @@ -9,7 +9,3 @@ Default: `post` ## Syntax - post ``: Set empty selection after ``. - -## Examples - -- `"post blue air"`: Places the cursor after the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/setSelectionBefore.mdx b/packages/app-web-docs/src/docs/user/actions/setSelectionBefore.mdx index e9f6bef7e8b..90a37072077 100644 --- a/packages/app-web-docs/src/docs/user/actions/setSelectionBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/setSelectionBefore.mdx @@ -9,7 +9,3 @@ Default: `pre` ## Syntax - pre ``: Set empty selection before ``. - -## Examples - -- `"pre blue air"`: Places the cursor before the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/showDebugHover.mdx b/packages/app-web-docs/src/docs/user/actions/showDebugHover.mdx index b1b9680d615..8ba5cd587d2 100644 --- a/packages/app-web-docs/src/docs/user/actions/showDebugHover.mdx +++ b/packages/app-web-docs/src/docs/user/actions/showDebugHover.mdx @@ -9,7 +9,3 @@ Default: `inspect` ## Syntax - inspect ``: Show debug hover for ``. - -## Examples - -- `"inspect blue air"`: Shows debug information for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/showHover.mdx b/packages/app-web-docs/src/docs/user/actions/showHover.mdx index beaa0f71567..a246baf2591 100644 --- a/packages/app-web-docs/src/docs/user/actions/showHover.mdx +++ b/packages/app-web-docs/src/docs/user/actions/showHover.mdx @@ -9,7 +9,3 @@ Default: `hover` ## Syntax - hover ``: Show hover for ``. - -## Examples - -- `"hover blue air"`: Shows hover information for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/showQuickFix.mdx b/packages/app-web-docs/src/docs/user/actions/showQuickFix.mdx index 1ddab315930..6bb48009414 100644 --- a/packages/app-web-docs/src/docs/user/actions/showQuickFix.mdx +++ b/packages/app-web-docs/src/docs/user/actions/showQuickFix.mdx @@ -9,7 +9,3 @@ Default: `quick fix` ## Syntax - quick fix ``: Show quick fix for ``. - -## Examples - -- `"quick fix blue air"`: Shows quick fixes for the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/showReferences.mdx b/packages/app-web-docs/src/docs/user/actions/showReferences.mdx index 97a180d2ebe..13df173051c 100644 --- a/packages/app-web-docs/src/docs/user/actions/showReferences.mdx +++ b/packages/app-web-docs/src/docs/user/actions/showReferences.mdx @@ -9,7 +9,3 @@ Default: `reference` ## Syntax - reference ``: Show references for ``. - -## Examples - -- `"reference blue air"`: Shows references to the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/sortTargets.mdx b/packages/app-web-docs/src/docs/user/actions/sortTargets.mdx index 5168492cedd..f576a458fb4 100644 --- a/packages/app-web-docs/src/docs/user/actions/sortTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/sortTargets.mdx @@ -9,7 +9,3 @@ Default: `sort` ## Syntax - sort ``: Sort ``s. - -## Examples - -- `"sort every item blue air"`: Sorts the collection items associated with the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/swapTargets.mdx b/packages/app-web-docs/src/docs/user/actions/swapTargets.mdx index a397d5955a7..bae5c1dae67 100644 --- a/packages/app-web-docs/src/docs/user/actions/swapTargets.mdx +++ b/packages/app-web-docs/src/docs/user/actions/swapTargets.mdx @@ -10,7 +10,3 @@ Default: `swap` - swap with ``: Swap selection with ``. - swap `` with ``: Swap `` with ``. - -## Examples - -- `"swap blue air with green bat"`: Swaps the token containing letter 'a' with a blue hat and the token containing letter 'b' with a green hat. diff --git a/packages/app-web-docs/src/docs/user/actions/toggleLineBreakpoint.mdx b/packages/app-web-docs/src/docs/user/actions/toggleLineBreakpoint.mdx index 634e093b774..6d0cd6a57b7 100644 --- a/packages/app-web-docs/src/docs/user/actions/toggleLineBreakpoint.mdx +++ b/packages/app-web-docs/src/docs/user/actions/toggleLineBreakpoint.mdx @@ -12,7 +12,3 @@ Default: `break point` - break point ``: Toggle breakpoint on line containing ``. - break point token ``: Toggle inline breakpoint at ``. - -## Examples - -- `"break point blue air"`: Toggles a breakpoint on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/toggleLineComment.mdx b/packages/app-web-docs/src/docs/user/actions/toggleLineComment.mdx index b4a1c698a80..4f58da1682d 100644 --- a/packages/app-web-docs/src/docs/user/actions/toggleLineComment.mdx +++ b/packages/app-web-docs/src/docs/user/actions/toggleLineComment.mdx @@ -9,7 +9,3 @@ Default: `comment` ## Syntax - comment ``: Toggle line comment at ``. - -## Examples - -- `"comment blue air"`: Toggles the comment on the line containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/unfoldRegion.mdx b/packages/app-web-docs/src/docs/user/actions/unfoldRegion.mdx index 7afa8567b93..4fbaf19f1ff 100644 --- a/packages/app-web-docs/src/docs/user/actions/unfoldRegion.mdx +++ b/packages/app-web-docs/src/docs/user/actions/unfoldRegion.mdx @@ -9,7 +9,3 @@ Default: `unfold` ## Syntax - unfold ``: Unfold region at ``. - -## Examples - -- `"unfold funk blue air"`: Unfolds the function containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/actions/wrapWithPairedDelimiter.mdx b/packages/app-web-docs/src/docs/user/actions/wrapWithPairedDelimiter.mdx index daa8755b465..eba21f32269 100644 --- a/packages/app-web-docs/src/docs/user/actions/wrapWithPairedDelimiter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/wrapWithPairedDelimiter.mdx @@ -9,7 +9,3 @@ Default: `wrap` ## Syntax - `` wrap ``: Wrap `` with ``. - -## Examples - -- `"box wrap blue air"`: Wraps the token containing letter 'a' with a blue hat in square brackets. diff --git a/packages/app-web-docs/src/docs/user/actions/wrapWithSnippet.mdx b/packages/app-web-docs/src/docs/user/actions/wrapWithSnippet.mdx index 021f8460612..1244c6e5ce1 100644 --- a/packages/app-web-docs/src/docs/user/actions/wrapWithSnippet.mdx +++ b/packages/app-web-docs/src/docs/user/actions/wrapWithSnippet.mdx @@ -9,7 +9,3 @@ Default: `wrap` ## Syntax - `` wrap ``: Wrap `` with ``. - -## Examples - -- `"if wrap blue air"`: Wraps the token containing letter 'a' with a blue hat in an if-statement snippet. diff --git a/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx b/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx index 1c77a82b3bf..ac2c22cde80 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx @@ -9,7 +9,3 @@ Default: `grand` ## Syntax - grand ``: Grandparent containing instance of ``. - -## Examples - -- `"take grand state blue air"`: Selects the parent statement of the statement containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx b/packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx index 15a2f1ba807..7656963f6ee 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx @@ -5,7 +5,3 @@ Cursorless ID: `containingScope` ## Syntax - ``: Containing instance of ``. - -## Examples - -- `"take state blue air"`: Selects the statement containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/endOf.mdx b/packages/app-web-docs/src/docs/user/modifiers/endOf.mdx index 89f547f4298..f5854c0d554 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/endOf.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/endOf.mdx @@ -9,7 +9,3 @@ Default: `end of` ## Syntax - end of: Empty position at end of target. - -## Examples - -- `"take end of blue air"`: Places the cursor at the end of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx b/packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx index de643fa1366..f8add57226e 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx @@ -9,7 +9,3 @@ Default: `every` ## Syntax - every ``: Every instance of ``. - -## Examples - -- `"take every item blue air"`: Selects every item in the map containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/excludeInterior.mdx b/packages/app-web-docs/src/docs/user/modifiers/excludeInterior.mdx index 30f084061ca..6eb3e90a795 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/excludeInterior.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/excludeInterior.mdx @@ -9,7 +9,3 @@ Default: `bounds` ## Syntax - bounds: Bounding paired delimiters. - -## Examples - -- `"take bounds round blue air"`: Selects only the parentheses containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx b/packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx index dc5d643558b..0b503d74005 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx @@ -10,7 +10,3 @@ Default: `tail` - tail: Extend through end of line/pair. - tail ``: Extend through end of ``. - -## Examples - -- `"take tail blue air"`: Selects from the token containing letter 'a' with a blue hat through the end of its line or surrounding pair. diff --git a/packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx b/packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx index f518509520c..529b1926266 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx @@ -10,7 +10,3 @@ Default: `head` - head: Extend through start of line/pair. - head ``: Extend through start of ``. - -## Examples - -- `"take head blue air"`: Selects from the token containing letter 'a' with a blue hat through the start of its line or surrounding pair. diff --git a/packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx b/packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx index 96915f09a4d..5d160818736 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx @@ -9,7 +9,3 @@ Default: `its` ## Syntax - its: Infer previous mark. - -## Examples - -- `"take blue air past end of its line"`: Selects from the token containing letter 'a' with a blue hat through the end of the line containing that token. diff --git a/packages/app-web-docs/src/docs/user/modifiers/interiorOnly.mdx b/packages/app-web-docs/src/docs/user/modifiers/interiorOnly.mdx index 5ffb513dd33..82a90963bad 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/interiorOnly.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/interiorOnly.mdx @@ -9,7 +9,3 @@ Default: `inside` ## Syntax - inside: Interior only. - -## Examples - -- `"take inside round blue air"`: Selects the contents of the parentheses containing the token containing letter 'a' with a blue hat, excluding the parentheses. diff --git a/packages/app-web-docs/src/docs/user/modifiers/keepContentFilter.mdx b/packages/app-web-docs/src/docs/user/modifiers/keepContentFilter.mdx index 2329e762b17..b7016d7a349 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/keepContentFilter.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/keepContentFilter.mdx @@ -9,7 +9,3 @@ Default: `content` ## Syntax - content: Keep content filter. - -## Examples - -- `"take content"`: Selects only to the nonempty selections when there are multiple selections. diff --git a/packages/app-web-docs/src/docs/user/modifiers/keepEmptyFilter.mdx b/packages/app-web-docs/src/docs/user/modifiers/keepEmptyFilter.mdx index 5dc413b341e..ad485607a57 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/keepEmptyFilter.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/keepEmptyFilter.mdx @@ -9,7 +9,3 @@ Default: `empty` ## Syntax - empty: Keep empty filter. - -## Examples - -- `"take empty"`: Selects only the empty selections when there are multiple selections. diff --git a/packages/app-web-docs/src/docs/user/modifiers/leading.mdx b/packages/app-web-docs/src/docs/user/modifiers/leading.mdx index cb68bfe9cf8..8d2f97d26ab 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/leading.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/leading.mdx @@ -9,7 +9,3 @@ Default: `leading` ## Syntax - leading: Leading delimiter range. - -## Examples - -- `"take leading item blue air"`: Selects the leading delimiter of the item containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx b/packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx index e648fa3b433..811bda5be9b 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx @@ -10,8 +10,3 @@ Cursorless ID: `ordinalScope` - every first `` ``s: First `` instances of `` in iteration scope, as individual targets. - last `` ``s: Last `` instances of `` in iteration scope, as contiguous range. - every last `` ``s: Last `` instances of `` in iteration scope, as individual targets. - -## Examples - -- `"take third state"`: Selects the third statement in the iteration scope. -- `"take first three states"`: Selects a contiguous range containing the first three statements in the iteration scope. diff --git a/packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx b/packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx index 2a2312de013..17f60ebbcd0 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx @@ -18,8 +18,3 @@ Cursorless ID: `relativeScope` - every previous `` ``s: Previous `` instances of ``, as individual targets. - next `` ``s: Next `` instances of ``, as contiguous range. - every next `` ``s: Next `` instances of ``, as individual targets. - -## Examples - -- `"take next state blue air"`: Selects the next statement after the statement containing the token containing letter 'a' with a blue hat. -- `"take three states backward blue air"`: Selects three statements as a contiguous range, starting at the token containing letter 'a' with a blue hat and going backward. diff --git a/packages/app-web-docs/src/docs/user/modifiers/startOf.mdx b/packages/app-web-docs/src/docs/user/modifiers/startOf.mdx index 3915ad01890..aa7ea21daa3 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/startOf.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/startOf.mdx @@ -9,7 +9,3 @@ Default: `start of` ## Syntax - start of: Empty position at start of target. - -## Examples - -- `"take start of blue air"`: Places the cursor at the start of the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/toRawSelection.mdx b/packages/app-web-docs/src/docs/user/modifiers/toRawSelection.mdx index 0ff532f6d56..79aa46b991c 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/toRawSelection.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/toRawSelection.mdx @@ -9,7 +9,3 @@ Default: `just` ## Syntax - just: No inference. - -## Examples - -- `"chuck just blue air"`: Deletes only the token containing letter 'a' with a blue hat, leaving adjacent whitespace unchanged. diff --git a/packages/app-web-docs/src/docs/user/modifiers/trailing.mdx b/packages/app-web-docs/src/docs/user/modifiers/trailing.mdx index 85484fba89f..cdf6807416c 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/trailing.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/trailing.mdx @@ -9,7 +9,3 @@ Default: `trailing` ## Syntax - trailing: Trailing delimiter range. - -## Examples - -- `"take trailing item blue air"`: Selects the trailing delimiter of the item containing the token containing letter 'a' with a blue hat. diff --git a/packages/app-web-docs/src/docs/user/modifiers/visible.mdx b/packages/app-web-docs/src/docs/user/modifiers/visible.mdx index d34ec5664bd..6678e13c668 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/visible.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/visible.mdx @@ -9,7 +9,3 @@ Default: `visible` ## Syntax - visible: Visible in viewport. - -## Examples - -- `"take visible"`: Selects the content currently visible in the editor viewport. diff --git a/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx b/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx index e3f6143a2d8..a47bd16c86f 100644 --- a/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx @@ -12,8 +12,4 @@ Default: `lambda` - lambda: Anonymous function. -## Examples - -- `"take lambda blue air"`: Selects the anonymous function containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx b/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx index 6e18a98d5cb..081766e5bcd 100644 --- a/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx @@ -12,8 +12,4 @@ Default: `arg list` - arg list: Argument list. -## Examples - -- `"take arg list blue air"`: Selects the argument list containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx b/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx index 5ec7de7b831..a38f9d6b496 100644 --- a/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx @@ -12,8 +12,4 @@ Default: `arg` - arg: Argument. -## Examples - -- `"take arg blue air"`: Selects the argument or parameter containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/attribute.mdx b/packages/app-web-docs/src/docs/user/scopes/attribute.mdx index 526fd9020ef..38eb84adaaf 100644 --- a/packages/app-web-docs/src/docs/user/scopes/attribute.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/attribute.mdx @@ -12,8 +12,4 @@ Default: `attribute` - attribute: Attribute. -## Examples - -- `"take attribute blue air"`: Selects the attribute containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/boundedNonWhitespaceSequence.mdx b/packages/app-web-docs/src/docs/user/scopes/boundedNonWhitespaceSequence.mdx index 173bb6e09dc..4aac14a632c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/boundedNonWhitespaceSequence.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/boundedNonWhitespaceSequence.mdx @@ -16,8 +16,4 @@ Default: `short paint` - short paint: Non-whitespace sequence bounded by surrounding pair delimiters. -## Examples - -- `"take short paint blue air"`: Selects the bounded non-whitespace sequence containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/boundedParagraph.mdx b/packages/app-web-docs/src/docs/user/scopes/boundedParagraph.mdx index f35c193d325..a40429b28f1 100644 --- a/packages/app-web-docs/src/docs/user/scopes/boundedParagraph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/boundedParagraph.mdx @@ -12,8 +12,4 @@ Default: `short block` - short block: Paragraph bounded by surrounding pair delimiters. -## Examples - -- `"take short block blue air"`: Selects the bounded paragraph containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/branch.mdx b/packages/app-web-docs/src/docs/user/scopes/branch.mdx index 08f5cf465c8..6319e1e5203 100644 --- a/packages/app-web-docs/src/docs/user/scopes/branch.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/branch.mdx @@ -12,8 +12,4 @@ Default: `branch` - branch: Branch. -## Examples - -- `"take branch blue air"`: Selects the branch containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/chapter.mdx b/packages/app-web-docs/src/docs/user/scopes/chapter.mdx index 5dadb357f8d..e40992795bc 100644 --- a/packages/app-web-docs/src/docs/user/scopes/chapter.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/chapter.mdx @@ -12,8 +12,4 @@ Default: `chapter` - chapter: Chapter. -## Examples - -- `"take chapter blue air"`: Selects the chapter containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/character.mdx b/packages/app-web-docs/src/docs/user/scopes/character.mdx index 1f314e1ee29..952eb56ad21 100644 --- a/packages/app-web-docs/src/docs/user/scopes/character.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/character.mdx @@ -12,8 +12,4 @@ Default: `char` - char: Character. -## Examples - -- `"take char blue air"`: Selects the character containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/class.mdx b/packages/app-web-docs/src/docs/user/scopes/class.mdx index fad252195ee..54732d6896a 100644 --- a/packages/app-web-docs/src/docs/user/scopes/class.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/class.mdx @@ -12,8 +12,4 @@ Default: `class` - class: Class. -## Examples - -- `"take class blue air"`: Selects the class containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/className.mdx b/packages/app-web-docs/src/docs/user/scopes/className.mdx index 73d6c9046de..d7009742fe7 100644 --- a/packages/app-web-docs/src/docs/user/scopes/className.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/className.mdx @@ -12,8 +12,4 @@ Default: `class name` - class name: Class name. -## Examples - -- `"take class name blue air"`: Selects the class name containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/collectionItem.mdx b/packages/app-web-docs/src/docs/user/scopes/collectionItem.mdx index 76b0b6abf75..ae9588c548c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/collectionItem.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/collectionItem.mdx @@ -12,8 +12,4 @@ Default: `item` - item: Collection item. -## Examples - -- `"take item blue air"`: Selects the collection item containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx b/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx index 02c53d9f935..cfaf4c2b0cf 100644 --- a/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx @@ -12,8 +12,4 @@ Default: `key` - key: Collection key. -## Examples - -- `"take key blue air"`: Selects the collection key containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/command.mdx b/packages/app-web-docs/src/docs/user/scopes/command.mdx index e7a027ee137..61f1ac178ab 100644 --- a/packages/app-web-docs/src/docs/user/scopes/command.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/command.mdx @@ -12,8 +12,4 @@ Default: `command` - command: Command. -## Examples - -- `"take command blue air"`: Selects the command containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/comment.mdx b/packages/app-web-docs/src/docs/user/scopes/comment.mdx index a1fc29ca6da..2dd78964940 100644 --- a/packages/app-web-docs/src/docs/user/scopes/comment.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/comment.mdx @@ -12,8 +12,4 @@ Default: `comment` - comment: Comment. -## Examples - -- `"take comment blue air"`: Selects the comment containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/condition.mdx b/packages/app-web-docs/src/docs/user/scopes/condition.mdx index 23493b7346c..e7f45152b0d 100644 --- a/packages/app-web-docs/src/docs/user/scopes/condition.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/condition.mdx @@ -12,8 +12,4 @@ Default: `condition` - condition: Condition. -## Examples - -- `"take condition blue air"`: Selects the condition containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/document.mdx b/packages/app-web-docs/src/docs/user/scopes/document.mdx index 71d9f6ae1af..e1267b8be0f 100644 --- a/packages/app-web-docs/src/docs/user/scopes/document.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/document.mdx @@ -12,8 +12,4 @@ Default: `file` - file: Document. -## Examples - -- `"take file blue air"`: Selects the document containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/environment.mdx b/packages/app-web-docs/src/docs/user/scopes/environment.mdx index 059231ca2dc..a1b80532fe1 100644 --- a/packages/app-web-docs/src/docs/user/scopes/environment.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/environment.mdx @@ -12,8 +12,4 @@ Default: `environment` - environment: Environment. -## Examples - -- `"take environment blue air"`: Selects the environment containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/fullLine.mdx b/packages/app-web-docs/src/docs/user/scopes/fullLine.mdx index 1c529915ea5..dae800b9b3f 100644 --- a/packages/app-web-docs/src/docs/user/scopes/fullLine.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/fullLine.mdx @@ -12,8 +12,4 @@ Default: `full line` - full line: Full line. -## Examples - -- `"take full line blue air"`: Selects the full line containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx b/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx index 20ef1a7903c..ba1fc8cd8b4 100644 --- a/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx @@ -12,8 +12,4 @@ Default: `call` - call: Function call. -## Examples - -- `"take call blue air"`: Selects the function call containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx b/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx index c7d771f61b7..cc809e1443e 100644 --- a/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx @@ -12,8 +12,4 @@ Default: `callee` - callee: Function callee. -## Examples - -- `"take callee blue air"`: Selects the function callee containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/functionName.mdx b/packages/app-web-docs/src/docs/user/scopes/functionName.mdx index 0f559d5c2d7..7ccaa99212d 100644 --- a/packages/app-web-docs/src/docs/user/scopes/functionName.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/functionName.mdx @@ -12,8 +12,4 @@ Default: `funk name` - funk name: Function name. -## Examples - -- `"take funk name blue air"`: Selects the function name containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/glyph.mdx b/packages/app-web-docs/src/docs/user/scopes/glyph.mdx index 283590752db..1de8ee15a94 100644 --- a/packages/app-web-docs/src/docs/user/scopes/glyph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/glyph.mdx @@ -12,8 +12,4 @@ Default: `glyph` - glyph ``: Instance of single character ``. -## Examples - -- `"take next glyph air"`: Selects the next 'a'. - diff --git a/packages/app-web-docs/src/docs/user/scopes/identifier.mdx b/packages/app-web-docs/src/docs/user/scopes/identifier.mdx index eaa35adf9d7..eb89bd9c7aa 100644 --- a/packages/app-web-docs/src/docs/user/scopes/identifier.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/identifier.mdx @@ -12,8 +12,4 @@ Default: `identifier` - identifier: Identifier. -## Examples - -- `"take identifier blue air"`: Selects the identifier containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx b/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx index 996412013ba..32dd292d0e4 100644 --- a/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx @@ -12,8 +12,4 @@ Default: `if state` - if state: If statement. -## Examples - -- `"take if state blue air"`: Selects the if statement containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/instance.mdx b/packages/app-web-docs/src/docs/user/scopes/instance.mdx index 94bf021fa7b..e90bb9e0029 100644 --- a/packages/app-web-docs/src/docs/user/scopes/instance.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/instance.mdx @@ -12,8 +12,4 @@ Default: `instance` - instance: Instance. -## Examples - -- `"take every instance blue air"`: Selects every instance of the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/line.mdx b/packages/app-web-docs/src/docs/user/scopes/line.mdx index 484270572af..e8c8689dee4 100644 --- a/packages/app-web-docs/src/docs/user/scopes/line.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/line.mdx @@ -12,8 +12,4 @@ Default: `line` - line: Line. -## Examples - -- `"take line blue air"`: Selects the line containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/list.mdx b/packages/app-web-docs/src/docs/user/scopes/list.mdx index 640abfe242e..e160b1350fe 100644 --- a/packages/app-web-docs/src/docs/user/scopes/list.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/list.mdx @@ -12,8 +12,4 @@ Default: `list` - list: List. -## Examples - -- `"take list blue air"`: Selects the list containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/map.mdx b/packages/app-web-docs/src/docs/user/scopes/map.mdx index c4485d3e54b..8aae8ba45cf 100644 --- a/packages/app-web-docs/src/docs/user/scopes/map.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/map.mdx @@ -12,8 +12,4 @@ Default: `map` - map: Map. -## Examples - -- `"take map blue air"`: Selects the map containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/name.mdx b/packages/app-web-docs/src/docs/user/scopes/name.mdx index b347378b88a..fb1bdd43138 100644 --- a/packages/app-web-docs/src/docs/user/scopes/name.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/name.mdx @@ -12,8 +12,4 @@ Default: `name` - name: Name. -## Examples - -- `"take name blue air"`: Selects the name containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx b/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx index a51bac0e96d..adcc4d9545f 100644 --- a/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx @@ -12,8 +12,4 @@ Default: `funk` - funk: Named function. -## Examples - -- `"take funk blue air"`: Selects the named function containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/namedParagraph.mdx b/packages/app-web-docs/src/docs/user/scopes/namedParagraph.mdx index f3679526c90..00893b42777 100644 --- a/packages/app-web-docs/src/docs/user/scopes/namedParagraph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/namedParagraph.mdx @@ -12,8 +12,4 @@ Default: `paragraph` - paragraph: Named paragraph. -## Examples - -- `"take paragraph blue air"`: Selects the named paragraph containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/nonWhitespaceSequence.mdx b/packages/app-web-docs/src/docs/user/scopes/nonWhitespaceSequence.mdx index 8e412c7f2e0..4c191cd44a7 100644 --- a/packages/app-web-docs/src/docs/user/scopes/nonWhitespaceSequence.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/nonWhitespaceSequence.mdx @@ -12,8 +12,4 @@ Default: `paint` - paint: Non-whitespace sequence. -## Examples - -- `"take paint blue air"`: Selects the non-whitespace sequence containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/notebookCell.mdx b/packages/app-web-docs/src/docs/user/scopes/notebookCell.mdx index 88da8182128..43d4cfecd7c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/notebookCell.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/notebookCell.mdx @@ -12,8 +12,4 @@ Default: `cell` - cell: Notebook cell. -## Examples - -- `"take cell blue air"`: Selects the notebook cell containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/paragraph.mdx b/packages/app-web-docs/src/docs/user/scopes/paragraph.mdx index 26e05a5c079..51dc0feed12 100644 --- a/packages/app-web-docs/src/docs/user/scopes/paragraph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/paragraph.mdx @@ -12,8 +12,4 @@ Default: `block` - block: Paragraph. -## Examples - -- `"take block blue air"`: Selects the paragraph containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/part.mdx b/packages/app-web-docs/src/docs/user/scopes/part.mdx index 59d2c35914f..42cd85460d6 100644 --- a/packages/app-web-docs/src/docs/user/scopes/part.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/part.mdx @@ -12,8 +12,4 @@ Default: `part` - part: Part. -## Examples - -- `"take part blue air"`: Selects the part containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx b/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx index 6c51f748b79..2fc5a46ec93 100644 --- a/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx @@ -12,8 +12,4 @@ Default: `regex` - regex: Regular expression. -## Examples - -- `"take regex blue air"`: Selects the regular expression containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/section.mdx b/packages/app-web-docs/src/docs/user/scopes/section.mdx index 0bb2cd53241..1d3f7c5b979 100644 --- a/packages/app-web-docs/src/docs/user/scopes/section.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/section.mdx @@ -12,8 +12,4 @@ Default: `section` - section: Section. -## Examples - -- `"take section blue air"`: Selects the section containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelFive.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelFive.mdx index 30212543db8..7af86a33780 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelFive.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelFive.mdx @@ -13,8 +13,4 @@ Default: `five section`\ - five section: Section level five. -## Examples - -- `"take five section blue air"`: Selects the section level five containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelFour.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelFour.mdx index b3af8a9c578..aeef649dfad 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelFour.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelFour.mdx @@ -13,8 +13,4 @@ Default: `four section`\ - four section: Section level four. -## Examples - -- `"take four section blue air"`: Selects the section level four containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelOne.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelOne.mdx index 0eca75159f0..b92e71d531c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelOne.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelOne.mdx @@ -13,8 +13,4 @@ Default: `one section`\ - one section: Section level one. -## Examples - -- `"take one section blue air"`: Selects the section level one containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelSix.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelSix.mdx index 51a108d0df4..4199611aceb 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelSix.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelSix.mdx @@ -13,8 +13,4 @@ Default: `six section`\ - six section: Section level six. -## Examples - -- `"take six section blue air"`: Selects the section level six containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelThree.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelThree.mdx index 5a8f2883b4c..cea79f312ef 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelThree.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelThree.mdx @@ -13,8 +13,4 @@ Default: `three section`\ - three section: Section level three. -## Examples - -- `"take three section blue air"`: Selects the section level three containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/sectionLevelTwo.mdx b/packages/app-web-docs/src/docs/user/scopes/sectionLevelTwo.mdx index d79233070fc..f39cc5f990b 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sectionLevelTwo.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sectionLevelTwo.mdx @@ -13,8 +13,4 @@ Default: `two section`\ - two section: Section level two. -## Examples - -- `"take two section blue air"`: Selects the section level two containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/selector.mdx b/packages/app-web-docs/src/docs/user/scopes/selector.mdx index 87353e50fbe..1149a0905c7 100644 --- a/packages/app-web-docs/src/docs/user/scopes/selector.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/selector.mdx @@ -12,8 +12,4 @@ Default: `selector` - selector: Selector. -## Examples - -- `"take selector blue air"`: Selects the selector containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/sentence.mdx b/packages/app-web-docs/src/docs/user/scopes/sentence.mdx index 2811e3537e3..f5e777bdb3a 100644 --- a/packages/app-web-docs/src/docs/user/scopes/sentence.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/sentence.mdx @@ -12,8 +12,4 @@ Default: `sentence` - sentence: Sentence. -## Examples - -- `"take sentence blue air"`: Selects the sentence containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/statement.mdx b/packages/app-web-docs/src/docs/user/scopes/statement.mdx index 5331db88a4e..a9b721ab0e6 100644 --- a/packages/app-web-docs/src/docs/user/scopes/statement.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/statement.mdx @@ -12,8 +12,4 @@ Default: `state` - state: Statement. -## Examples - -- `"take state blue air"`: Selects the statement containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/subParagraph.mdx b/packages/app-web-docs/src/docs/user/scopes/subParagraph.mdx index c603393bdf2..6e1e73abfc1 100644 --- a/packages/app-web-docs/src/docs/user/scopes/subParagraph.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/subParagraph.mdx @@ -12,8 +12,4 @@ Default: `subparagraph` - subparagraph: Subparagraph. -## Examples - -- `"take subparagraph blue air"`: Selects the subparagraph containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/subSection.mdx b/packages/app-web-docs/src/docs/user/scopes/subSection.mdx index ffec3486122..a60e7c87148 100644 --- a/packages/app-web-docs/src/docs/user/scopes/subSection.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/subSection.mdx @@ -12,8 +12,4 @@ Default: `subsection` - subsection: Subsection. -## Examples - -- `"take subsection blue air"`: Selects the subsection containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/subSubSection.mdx b/packages/app-web-docs/src/docs/user/scopes/subSubSection.mdx index 7b540f1ffb1..6df78a5f663 100644 --- a/packages/app-web-docs/src/docs/user/scopes/subSubSection.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/subSubSection.mdx @@ -12,8 +12,4 @@ Default: `subsubsection` - subsubsection: Subsubsection. -## Examples - -- `"take subsubsection blue air"`: Selects the subsubsection containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/surroundingPair.mdx b/packages/app-web-docs/src/docs/user/scopes/surroundingPair.mdx index c23bc71f0a7..f1f0f05eac0 100644 --- a/packages/app-web-docs/src/docs/user/scopes/surroundingPair.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/surroundingPair.mdx @@ -8,8 +8,4 @@ Cursorless ID: `surroundingPair` - ``: Surrounding pair. -## Examples - -- `"take round blue air"`: Selects the parentheses containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/token.mdx b/packages/app-web-docs/src/docs/user/scopes/token.mdx index b19d4f2dc46..ad20363905e 100644 --- a/packages/app-web-docs/src/docs/user/scopes/token.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/token.mdx @@ -12,8 +12,4 @@ Default: `token` - token: Token. -## Examples - -- `"take token blue air"`: Selects the token containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/type.mdx b/packages/app-web-docs/src/docs/user/scopes/type.mdx index 90f5497a83b..e6184963447 100644 --- a/packages/app-web-docs/src/docs/user/scopes/type.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/type.mdx @@ -12,8 +12,4 @@ Default: `type` - type: Type. -## Examples - -- `"take type blue air"`: Selects the type containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/unit.mdx b/packages/app-web-docs/src/docs/user/scopes/unit.mdx index 677fb5e0787..ec8afaf7b73 100644 --- a/packages/app-web-docs/src/docs/user/scopes/unit.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/unit.mdx @@ -12,8 +12,4 @@ Default: `unit` - unit: Unit. -## Examples - -- `"take unit blue air"`: Selects the unit containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/url.mdx b/packages/app-web-docs/src/docs/user/scopes/url.mdx index 74e5d760eb3..1a38067803c 100644 --- a/packages/app-web-docs/src/docs/user/scopes/url.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/url.mdx @@ -12,8 +12,4 @@ Default: `link` - link: URL. -## Examples - -- `"take link blue air"`: Selects the url containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/value.mdx b/packages/app-web-docs/src/docs/user/scopes/value.mdx index 5c61cffd797..340febe9d2e 100644 --- a/packages/app-web-docs/src/docs/user/scopes/value.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/value.mdx @@ -12,8 +12,4 @@ Default: `value` - value: Value. -## Examples - -- `"take value blue air"`: Selects the value containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/word.mdx b/packages/app-web-docs/src/docs/user/scopes/word.mdx index 517ea126860..9051496d9c8 100644 --- a/packages/app-web-docs/src/docs/user/scopes/word.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/word.mdx @@ -13,8 +13,4 @@ Legacy: `word` - sub: Sub token word. -## Examples - -- `"take sub blue air"`: Selects the sub token word containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx b/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx index d231ac47f5c..8218dfab626 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx @@ -12,8 +12,4 @@ Default: `tags` - tags: XML both tags. -## Examples - -- `"take tags blue air"`: Selects the xml both tags containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/xmlElement.mdx b/packages/app-web-docs/src/docs/user/scopes/xmlElement.mdx index 0e88e38e581..f2582bdacdd 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlElement.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlElement.mdx @@ -12,8 +12,4 @@ Default: `element` - element: XML element. -## Examples - -- `"take element blue air"`: Selects the xml element containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/xmlEndTag.mdx b/packages/app-web-docs/src/docs/user/scopes/xmlEndTag.mdx index 2a102fd58b0..8e28752f35b 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlEndTag.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlEndTag.mdx @@ -12,8 +12,4 @@ Default: `end tag` - end tag: XML end tag. -## Examples - -- `"take end tag blue air"`: Selects the xml end tag containing the token containing letter 'a' with a blue hat. - diff --git a/packages/app-web-docs/src/docs/user/scopes/xmlStartTag.mdx b/packages/app-web-docs/src/docs/user/scopes/xmlStartTag.mdx index b563e7d2328..09bd6c3e28f 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlStartTag.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlStartTag.mdx @@ -12,8 +12,4 @@ Default: `start tag` - start tag: XML start tag. -## Examples - -- `"take start tag blue air"`: Selects the xml start tag containing the token containing letter 'a' with a blue hat. - diff --git a/packages/lib-common/src/references/actionReferences.ts b/packages/lib-common/src/references/actionReferences.ts index 5d2fa836bdd..57079efd578 100644 --- a/packages/lib-common/src/references/actionReferences.ts +++ b/packages/lib-common/src/references/actionReferences.ts @@ -1,9 +1,15 @@ import type { ActionType } from "../types/command/ActionDescriptor"; -import { connectiveSpokenForms } from "./connectiveSpokenForms"; import { + FORMATTER_CAMEL, REMOVE, SET_SELECTION, SNIPPET_IF, + TARGET, + TARGET_2, + TARGET_2_DESC, + TARGET_DESC, + TARGET_NUMBER, + TARGET_NUMBER_DESC, VAR_DESTINATION, VAR_FORMATTER, VAR_PAIR, @@ -16,26 +22,28 @@ import { } from "./constants"; import { getSpokenForm } from "./getSpokenForm"; import { modifierReferences } from "./modifierReferences"; +import { pairedDelimiterReferences } from "./pairedDelimiterReferences"; import type { ReferenceEntry } from "./ReferenceEntry"; import { scopeReferences } from "./scopeReferences"; - -const TARGET = "blue air"; -const TARGET_DESC = "token containing letter 'a' with a blue hat"; -const TARGET_2 = "green bat"; -const TARGET_2_DESC = "token containing letter 'b' with a green hat"; +import { connectiveDefaultSpokenForms } from "./spokenForms/connectiveDefaultSpokenForms"; const DEFAULT_PATTERN = `${VAR_SPOKEN_FORM} ${VAR_TARGET}`; const DEFAULT_PATTERN_SCOPE = `${VAR_SPOKEN_FORM} ${VAR_SCOPE} ${VAR_TARGET}`; const DEFAULT_COMMAND = `${VAR_SPOKEN_FORM} ${TARGET}`; -const COLLECTION_ITEM_SCOPE = getSpokenForm(scopeReferences.collectionItem); -const FUNCTION_CALL_SCOPE = getSpokenForm(scopeReferences.functionCall); -const INSTANCE_SCOPE = getSpokenForm(scopeReferences.instance); -const NAMED_FUNCTION_SCOPE = getSpokenForm(scopeReferences.namedFunction); -const TOKEN_SCOPE = getSpokenForm(scopeReferences.token); -const EVERY_MODIFIER = getSpokenForm(modifierReferences.everyScope); -const SWAP_CONNECTIVE = connectiveSpokenForms.swapConnective; -const AFTER = connectiveSpokenForms.after; +const ITEM = getSpokenForm(scopeReferences.collectionItem); +const CALL = getSpokenForm(scopeReferences.functionCall); +const INSTANCE = getSpokenForm(scopeReferences.instance); +const FUNCTION = getSpokenForm(scopeReferences.namedFunction); +const TOKEN = getSpokenForm(scopeReferences.token); +const EVERY = getSpokenForm(modifierReferences.everyScope); +const WITH = connectiveDefaultSpokenForms.swapConnective; +const AFTER = connectiveDefaultSpokenForms.after; +const TO = connectiveDefaultSpokenForms.sourceDestinationConnective; +const CURLY = pairedDelimiterReferences.curlyBrackets.defaultSpokenForm; +const SQUARE = pairedDelimiterReferences.squareBrackets.defaultSpokenForm; +const AT = connectiveDefaultSpokenForms.at; +const ON = connectiveDefaultSpokenForms.on; type TalonSideActionType = "applyFormatter" | "nextHomophone"; @@ -175,8 +183,8 @@ export const actionReferences: Record< ], examples: [ { - command: DEFAULT_COMMAND, - description: `Decrements the number at the ${TARGET_DESC}.`, + command: `${VAR_SPOKEN_FORM} ${TARGET_NUMBER}`, + description: `Decrements the number at the ${TARGET_NUMBER_DESC}.`, }, ], }, @@ -219,7 +227,7 @@ export const actionReferences: Record< description: `Inserts a new line below the ${TARGET_DESC} and moves the cursor to it.`, }, { - command: `${VAR_SPOKEN_FORM} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${ITEM} ${TARGET}`, description: `Inserts the delimiters for a new collection item after the item containing the ${TARGET_DESC} and moves the cursor there.`, }, ], @@ -246,7 +254,7 @@ export const actionReferences: Record< description: `Inserts a new line above the ${TARGET_DESC} and moves the cursor to it.`, }, { - command: `${VAR_SPOKEN_FORM} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${ITEM} ${TARGET}`, description: `Inserts the delimiters for a new collection item before the item containing the ${TARGET_DESC} and moves the cursor there.`, }, ], @@ -265,7 +273,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET} ${SET_SELECTION} ${EVERY_MODIFIER} ${INSTANCE_SCOPE} ${TARGET_2}`, + command: `${VAR_SPOKEN_FORM} ${FUNCTION} ${TARGET} ${SET_SELECTION} ${EVERY} ${INSTANCE} ${TARGET_2}`, description: `Selects every instance of the ${TARGET_2_DESC} within the function containing the ${TARGET_DESC}.`, }, ], @@ -282,7 +290,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${FUNCTION_CALL_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${CALL} ${TARGET}`, description: `Extracts the function call containing the ${TARGET_DESC} into a variable.`, }, ], @@ -350,7 +358,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${FUNCTION} ${TARGET}`, description: `Folds the function containing the ${TARGET_DESC}.`, }, ], @@ -469,8 +477,8 @@ export const actionReferences: Record< ], examples: [ { - command: DEFAULT_COMMAND, - description: `Increments the ${TARGET_DESC}.`, + command: `${VAR_SPOKEN_FORM} ${TARGET_NUMBER}`, + description: `Increments the ${TARGET_NUMBER_DESC}.`, }, ], }, @@ -503,7 +511,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${FUNCTION} ${TARGET}`, description: `Inserts a copy of the function containing the ${TARGET_DESC} after itself.`, }, ], @@ -520,7 +528,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${FUNCTION} ${TARGET}`, description: `Inserts a copy of the function containing the ${TARGET_DESC} before itself.`, }, ], @@ -541,7 +549,7 @@ export const actionReferences: Record< description: `Inserts an empty line below the ${TARGET_DESC} without moving the cursor.`, }, { - command: `${VAR_SPOKEN_FORM} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${ITEM} ${TARGET}`, description: `Inserts the required delimiter after the collection item containing the ${TARGET_DESC}.`, }, ], @@ -562,7 +570,7 @@ export const actionReferences: Record< description: `Inserts an empty line above the ${TARGET_DESC} without moving the cursor.`, }, { - command: `${VAR_SPOKEN_FORM} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${ITEM} ${TARGET}`, description: `Inserts the required delimiter before the collection item containing the ${TARGET_DESC}.`, }, ], @@ -583,7 +591,7 @@ export const actionReferences: Record< description: `Inserts empty lines around the line containing the ${TARGET_DESC} without moving the cursor.`, }, { - command: `${VAR_SPOKEN_FORM} ${TOKEN_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${TOKEN} ${TARGET}`, description: `Inserts spaces around the ${TARGET_DESC}.`, }, ], @@ -634,7 +642,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${EVERY_MODIFIER} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${EVERY} ${ITEM} ${TARGET}`, description: `Randomizes the collection items associated with the ${TARGET_DESC}.`, }, ], @@ -721,7 +729,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${EVERY_MODIFIER} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${EVERY} ${ITEM} ${TARGET}`, description: `Reverses the collection items associated with the ${TARGET_DESC}.`, }, ], @@ -908,7 +916,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${EVERY_MODIFIER} ${COLLECTION_ITEM_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${EVERY} ${ITEM} ${TARGET}`, description: `Sorts the collection items associated with the ${TARGET_DESC}.`, }, ], @@ -924,7 +932,7 @@ export const actionReferences: Record< cheatsheet: "Toggle line breakpoint", }, { - pattern: `${VAR_SPOKEN_FORM} ${TOKEN_SCOPE} ${VAR_TARGET}`, + pattern: `${VAR_SPOKEN_FORM} ${TOKEN} ${VAR_TARGET}`, description: `Toggle inline breakpoint at ${VAR_TARGET}.`, cheatsheet: "Toggle inline breakpoint", }, @@ -965,7 +973,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${FUNCTION} ${TARGET}`, description: `Unfolds the function containing the ${TARGET_DESC}.`, }, ], @@ -980,7 +988,7 @@ export const actionReferences: Record< cheatsheet: `Insert call to ${VAR_TARGET} on selection`, }, { - pattern: `${VAR_SPOKEN_FORM} ${VAR_TARGET_1} on ${VAR_TARGET_2}`, + pattern: `${VAR_SPOKEN_FORM} ${VAR_TARGET_1} ${ON} ${VAR_TARGET_2}`, description: `Insert call to ${VAR_TARGET_1} on ${VAR_TARGET_2}.`, cheatsheet: `Insert call to ${VAR_TARGET_1} on ${VAR_TARGET_2}`, }, @@ -1005,7 +1013,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${NAMED_FUNCTION_SCOPE} ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${FUNCTION} ${TARGET}`, description: `Generates a snippet from the function containing the ${TARGET_DESC}.`, }, ], @@ -1061,7 +1069,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${TARGET} after ${TARGET_2}`, + command: `${VAR_SPOKEN_FORM} ${TARGET} ${AFTER} ${TARGET_2}`, description: `Moves the ${TARGET_DESC} to after the ${TARGET_2_DESC}.`, }, ], @@ -1078,7 +1086,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} after ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${AFTER} ${TARGET}`, description: `Pastes the clipboard contents after the ${TARGET_DESC}.`, }, ], @@ -1100,7 +1108,7 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${TARGET} to ${TARGET_2}`, + command: `${VAR_SPOKEN_FORM} ${TARGET} ${TO} ${TARGET_2}`, description: `Replaces the ${TARGET_2_DESC} with a copy of the ${TARGET_DESC}.`, }, ], @@ -1117,7 +1125,7 @@ export const actionReferences: Record< ], examples: [ { - command: `curly ${VAR_SPOKEN_FORM} ${TARGET}`, + command: `${CURLY} ${VAR_SPOKEN_FORM} ${TARGET}`, description: `Replaces the paired delimiters around the ${TARGET_DESC} with curly brackets.`, }, ], @@ -1127,19 +1135,19 @@ export const actionReferences: Record< defaultSpokenForm: "swap", syntaxes: [ { - pattern: `${VAR_SPOKEN_FORM} ${SWAP_CONNECTIVE} ${VAR_TARGET}`, + pattern: `${VAR_SPOKEN_FORM} ${WITH} ${VAR_TARGET}`, description: `Swap selection with ${VAR_TARGET}.`, cheatsheet: `Swap selection with ${VAR_TARGET}`, }, { - pattern: `${VAR_SPOKEN_FORM} ${VAR_TARGET_1} ${SWAP_CONNECTIVE} ${VAR_TARGET_2}`, + pattern: `${VAR_SPOKEN_FORM} ${VAR_TARGET_1} ${WITH} ${VAR_TARGET_2}`, description: `Swap ${VAR_TARGET_1} with ${VAR_TARGET_2}.`, cheatsheet: `Swap ${VAR_TARGET_1} with ${VAR_TARGET_2}`, }, ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${TARGET} ${connectiveSpokenForms.swapConnective} ${TARGET_2}`, + command: `${VAR_SPOKEN_FORM} ${TARGET} ${WITH} ${TARGET_2}`, description: `Swaps the ${TARGET_DESC} and the ${TARGET_2_DESC}.`, }, ], @@ -1156,7 +1164,7 @@ export const actionReferences: Record< ], examples: [ { - command: `box ${VAR_SPOKEN_FORM} ${TARGET}`, + command: `${SQUARE} ${VAR_SPOKEN_FORM} ${TARGET}`, description: `Wraps the ${TARGET_DESC} in square brackets.`, }, ], @@ -1173,7 +1181,7 @@ export const actionReferences: Record< ], examples: [ { - command: `if ${VAR_SPOKEN_FORM} ${TARGET}`, + command: `${SNIPPET_IF} ${VAR_SPOKEN_FORM} ${TARGET}`, description: `Wraps the ${TARGET_DESC} in an if-statement snippet.`, }, ], @@ -1183,14 +1191,14 @@ export const actionReferences: Record< defaultSpokenForm: "format", syntaxes: [ { - pattern: `${VAR_SPOKEN_FORM} ${VAR_FORMATTER} at ${VAR_TARGET}`, + pattern: `${VAR_SPOKEN_FORM} ${VAR_FORMATTER} ${AT} ${VAR_TARGET}`, description: `Reformat ${VAR_TARGET} as ${VAR_FORMATTER}.`, cheatsheet: `Reformat ${VAR_TARGET} as ${VAR_FORMATTER}`, }, ], examples: [ { - command: `${VAR_SPOKEN_FORM} camel at ${TARGET}`, + command: `${VAR_SPOKEN_FORM} ${FORMATTER_CAMEL} ${AT} ${TARGET}`, description: `Reformats the ${TARGET_DESC} as camel case.`, }, ], diff --git a/packages/lib-common/src/references/constants.ts b/packages/lib-common/src/references/constants.ts index 4ad58be10b6..75c0c2fa077 100644 --- a/packages/lib-common/src/references/constants.ts +++ b/packages/lib-common/src/references/constants.ts @@ -1,3 +1,7 @@ +import { graphemeDefaultSpokenForms } from "./spokenForms/graphemeDefaultSpokenForms"; +import { hatColorDefaultSpokenForms } from "./spokenForms/markDefaultSpokenForms"; + +// Template variables export const VAR_SPOKEN_FORM = ""; export const VAR_TARGET = ""; export const VAR_TARGET_1 = ""; @@ -12,31 +16,26 @@ export const VAR_ORDINAL = ""; export const VAR_MODIFIER = ""; export const VAR_CHARACTER = ""; +// Targets +export const TARGET = `${hatColorDefaultSpokenForms.blue} ${graphemeDefaultSpokenForms.a}`; +export const TARGET_DESC = "token containing letter 'a' with a blue hat"; +export const TARGET_2 = `${hatColorDefaultSpokenForms.green} ${graphemeDefaultSpokenForms.b}`; +export const TARGET_2_DESC = "token containing letter 'b' with a green hat"; +export const TARGET_NUMBER = `${hatColorDefaultSpokenForms.red} ${graphemeDefaultSpokenForms["5"]}`; +export const TARGET_NUMBER_DESC = "token containing number '5' with a red hat"; + // Actions export const SET_SELECTION = "take"; export const REMOVE = "chuck"; // Modifiers export const EVERY = "every"; -export const EXTEND_THROUGH_END_OF = "past end of"; // Scopes export const LINE = "line"; export const ITEM = "item"; export const STATEMENT = "state"; -export const PARENTHESES = "round"; - -// Numbers -export const THREE = "three"; -export const THIRD = "third"; // Misc -export const AIR = "air"; - -export const FIRST = "first"; -export const LAST = "last"; -export const NEXT = "next"; -export const PREVIOUS = "previous"; -export const BACKWARD = "backward"; -export const FORWARD = "forward"; +export const FORMATTER_CAMEL = "camel"; export const SNIPPET_IF = "if"; diff --git a/packages/lib-common/src/references/index.ts b/packages/lib-common/src/references/index.ts index de62073f7da..d97391e702b 100644 --- a/packages/lib-common/src/references/index.ts +++ b/packages/lib-common/src/references/index.ts @@ -1,5 +1,9 @@ export * from "./actionReferences"; -export * from "./connectiveSpokenForms"; +export * from "./spokenForms/connectiveDefaultSpokenForms"; +export * from "./spokenForms/graphemeDefaultSpokenForms"; +export * from "./spokenForms/markDefaultSpokenForms"; +export * from "./spokenForms/numberDefaultSpokenForms"; export * from "./modifierReferences"; +export * from "./pairedDelimiterReferences"; export * from "./ReferenceEntry"; export * from "./scopeReferences"; diff --git a/packages/lib-common/src/references/modifierReferences.ts b/packages/lib-common/src/references/modifierReferences.ts index 20f5c5695ff..04042e86326 100644 --- a/packages/lib-common/src/references/modifierReferences.ts +++ b/packages/lib-common/src/references/modifierReferences.ts @@ -1,34 +1,36 @@ import type { ModifierType } from "../types/command/PartialTargetDescriptor.types"; -import type { SpokenFormMapKeyTypes } from "../types/SpokenFormType"; import { - BACKWARD, EVERY, - EXTEND_THROUGH_END_OF, - FIRST, - FORWARD, ITEM, - LAST, LINE, - NEXT, - PARENTHESES, - PREVIOUS, REMOVE, SET_SELECTION, STATEMENT, - THIRD, - THREE, + TARGET, + TARGET_DESC, VAR_MODIFIER, VAR_NUMBER, VAR_ORDINAL, VAR_SCOPE, VAR_SPOKEN_FORM, } from "./constants"; -import type { ReferenceEntry, SpokenFormReference } from "./ReferenceEntry"; +import { pairedDelimiterReferences } from "./pairedDelimiterReferences"; +import type { ReferenceEntry } from "./ReferenceEntry"; +import { connectiveDefaultSpokenForms } from "./spokenForms/connectiveDefaultSpokenForms"; +import { graphemeDefaultSpokenForms } from "./spokenForms/graphemeDefaultSpokenForms"; +import { ordinalDefaultSpokenForms } from "./spokenForms/numberDefaultSpokenForms"; const DEFAULT_PATTERN = VAR_SPOKEN_FORM; - -const TARGET = "blue air"; -const TARGET_DESC = "token containing letter 'a' with a blue hat"; +const PARENTHESES = pairedDelimiterReferences.parentheses.defaultSpokenForm; +const THREE = graphemeDefaultSpokenForms["3"]; +const EXTEND_THROUGH_END_OF = "past end of"; +const THIRD = ordinalDefaultSpokenForms[3]; +const PREVIOUS = connectiveDefaultSpokenForms.previous; +const NEXT = connectiveDefaultSpokenForms.next; +const BACKWARD = connectiveDefaultSpokenForms.backward; +const FORWARD = connectiveDefaultSpokenForms.forward; +const FIRST = connectiveDefaultSpokenForms.first; +const LAST = connectiveDefaultSpokenForms.last; type AdditionalModifierReferenceType = "ancestor"; @@ -491,52 +493,3 @@ export const modifierReferences: Record< examples: [], }, }; - -export const simpleModifierReferenceIds = [ - "excludeInterior", - "toRawSelection", - "leading", - "trailing", - "keepContentFilter", - "keepEmptyFilter", - "inferPreviousMark", - "startOf", - "endOf", - "interiorOnly", - "visible", - "extendThroughStartOf", - "extendThroughEndOf", - "everyScope", -] as const satisfies readonly SpokenFormMapKeyTypes["simpleModifier"][]; - -export const modifierExtraReferenceIds = [ - "first", - "last", - "previous", - "next", - "forward", - "backward", - "ancestor", -] as const satisfies readonly SpokenFormMapKeyTypes["modifierExtra"][]; - -export const modifierExtraReferences = { - first: { - defaultSpokenForm: FIRST, - }, - last: { - defaultSpokenForm: LAST, - }, - previous: { - defaultSpokenForm: PREVIOUS, - }, - next: { - defaultSpokenForm: NEXT, - }, - forward: { - defaultSpokenForm: FORWARD, - }, - backward: { - defaultSpokenForm: BACKWARD, - }, - ancestor: modifierReferences.ancestor, -} satisfies Record; diff --git a/packages/lib-common/src/references/pairedDelimiterReferences.ts b/packages/lib-common/src/references/pairedDelimiterReferences.ts new file mode 100644 index 00000000000..048709f5525 --- /dev/null +++ b/packages/lib-common/src/references/pairedDelimiterReferences.ts @@ -0,0 +1,67 @@ +import type { SpeakableSurroundingPairName } from "../types/SpokenFormType"; +import type { SpokenFormReference } from "./ReferenceEntry"; + +export const pairedDelimiterReferences = { + curlyBrackets: { + defaultSpokenForm: "curly", + }, + angleBrackets: { + defaultSpokenForm: "diamond", + }, + escapedDoubleQuotes: { + defaultSpokenForm: "escaped quad", + }, + escapedSingleQuotes: { + defaultSpokenForm: "escaped twin", + }, + escapedParentheses: { + defaultSpokenForm: "escaped round", + }, + escapedSquareBrackets: { + defaultSpokenForm: "escaped box", + }, + doubleQuotes: { + defaultSpokenForm: "quad", + }, + parentheses: { + defaultSpokenForm: "round", + }, + backtickQuotes: { + defaultSpokenForm: "skis", + }, + squareBrackets: { + defaultSpokenForm: "box", + }, + singleQuotes: { + defaultSpokenForm: "twin", + }, + tripleDoubleQuotes: { + defaultSpokenForm: "triple quad", + disabledByDefault: true, + private: true, + }, + tripleSingleQuotes: { + defaultSpokenForm: "triple twin", + disabledByDefault: true, + private: true, + }, + tripleBacktickQuotes: { + defaultSpokenForm: "triple skis", + disabledByDefault: true, + private: true, + }, + any: { + defaultSpokenForm: "pair", + }, + string: { + defaultSpokenForm: "string", + }, + whitespace: { + defaultSpokenForm: "void", + }, + collectionBoundary: { + defaultSpokenForm: "collection boundary", + disabledByDefault: true, + private: true, + }, +} satisfies Record; diff --git a/packages/lib-common/src/references/scopeReferences.ts b/packages/lib-common/src/references/scopeReferences.ts index 49829135866..b25429c084f 100644 --- a/packages/lib-common/src/references/scopeReferences.ts +++ b/packages/lib-common/src/references/scopeReferences.ts @@ -1,22 +1,26 @@ import type { ScopeTypeType } from "../types/command/PartialTargetDescriptor.types"; import { - AIR, EVERY, ITEM, - NEXT, - PARENTHESES, + LINE, SET_SELECTION, STATEMENT, VAR_CHARACTER, VAR_PAIR, VAR_SPOKEN_FORM, } from "./constants"; +import { pairedDelimiterReferences } from "./pairedDelimiterReferences"; import type { ReferenceEntry } from "./ReferenceEntry"; +import { connectiveDefaultSpokenForms } from "./spokenForms/connectiveDefaultSpokenForms"; +import { graphemeDefaultSpokenForms } from "./spokenForms/graphemeDefaultSpokenForms"; const DEFAULT_PATTERN = VAR_SPOKEN_FORM; -const TARGET = "blue air"; +const AIR = graphemeDefaultSpokenForms.a; +const TARGET = `blue ${AIR}`; const TARGET_DESC = "token containing letter 'a' with a blue hat"; +const PARENTHESIS = pairedDelimiterReferences.parentheses.defaultSpokenForm; +const NEXT = connectiveDefaultSpokenForms.next; export const scopeReferences: Record = { argumentOrParameter: { @@ -844,7 +848,7 @@ export const scopeReferences: Record = { }, line: { name: "Line", - defaultSpokenForm: "line", + defaultSpokenForm: LINE, syntaxes: [ { pattern: DEFAULT_PATTERN, @@ -1060,7 +1064,7 @@ export const scopeReferences: Record = { ], examples: [ { - command: `${SET_SELECTION} ${PARENTHESES} ${TARGET}`, + command: `${SET_SELECTION} ${PARENTHESIS} ${TARGET}`, description: `Selects the parentheses containing the ${TARGET_DESC}.`, }, ], diff --git a/packages/lib-common/src/references/connectiveSpokenForms.ts b/packages/lib-common/src/references/spokenForms/connectiveDefaultSpokenForms.ts similarity index 80% rename from packages/lib-common/src/references/connectiveSpokenForms.ts rename to packages/lib-common/src/references/spokenForms/connectiveDefaultSpokenForms.ts index ad83f4d2dc3..773a61eb7fc 100644 --- a/packages/lib-common/src/references/connectiveSpokenForms.ts +++ b/packages/lib-common/src/references/spokenForms/connectiveDefaultSpokenForms.ts @@ -1,4 +1,4 @@ -export const connectiveSpokenForms = { +export const connectiveDefaultSpokenForms = { rangeExclusive: "between", rangeInclusive: "past", // Note: rangeExcludingStart has no default spoken form @@ -11,8 +11,13 @@ export const connectiveSpokenForms = { after: "after", verticalRange: "slice", + first: "first", + last: "last", previous: "previous", next: "next", forward: "forward", backward: "backward", + + at: "at", + on: "on", } as const; diff --git a/packages/lib-engine/src/spokenForms/graphemes.ts b/packages/lib-common/src/references/spokenForms/graphemeDefaultSpokenForms.ts similarity index 60% rename from packages/lib-engine/src/spokenForms/graphemes.ts rename to packages/lib-common/src/references/spokenForms/graphemeDefaultSpokenForms.ts index ee568f87bc7..af68dbbf24d 100644 --- a/packages/lib-engine/src/spokenForms/graphemes.ts +++ b/packages/lib-common/src/references/spokenForms/graphemeDefaultSpokenForms.ts @@ -1,18 +1,51 @@ // https://github.com/talonhub/community/blob/9acb6c9659bb0c9b794a7b7126d025603b4ed726/core/keys/keys.py +const offset = "a".codePointAt(0)!; + const alphabet = Object.fromEntries( - "air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip" - .split(" ") - .map((word, index) => [ - String.fromCodePoint("a".codePointAt(0)! + index), - word, - ]), + [ + "air", + "bat", + "cap", + "drum", + "each", + "fine", + "gust", + "harp", + "sit", + "jury", + "crunch", + "look", + "made", + "near", + "odd", + "pit", + "quench", + "red", + "sun", + "trap", + "urge", + "vest", + "whale", + "plex", + "yank", + "zip", + ].map((word, index) => [String.fromCodePoint(offset + index), word]), ); const digits = Object.fromEntries( - "zero one two three four five six seven eight nine" - .split(" ") - .map((word, index) => [index.toString(), word]), + [ + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + ].map((word, index) => [index.toString(), word]), ); const symbols = { diff --git a/packages/lib-common/src/references/spokenForms/markDefaultSpokenForms.ts b/packages/lib-common/src/references/spokenForms/markDefaultSpokenForms.ts new file mode 100644 index 00000000000..9a9fb9b1d3a --- /dev/null +++ b/packages/lib-common/src/references/spokenForms/markDefaultSpokenForms.ts @@ -0,0 +1,52 @@ +import type { PartialMark } from "../../types/command/PartialTargetDescriptor.types"; + +type MarkType = PartialMark["type"]; + +export const hatColorDefaultSpokenForms: Record = { + blue: "blue", + green: "green", + red: "red", + pink: "pink", + yellow: "yellow", + userColor1: "navy", + userColor2: "apricot", + userColor3: "user color three", + userColor4: "user color four", + + default: null, +}; + +export const hatShapeDefaultSpokenForms: Record = { + ex: "ex", + fox: "fox", + wing: "wing", + hole: "hole", + frame: "frame", + curve: "curve", + eye: "eye", + play: "play", + crosshairs: "cross", + bolt: "bolt", + + default: null, +}; + +export const markDefaultSpokenForms = { + cursor: "this", + that: "that", + source: "source", + nothing: "nothing", + + keyboard: null, + explicit: null, + decoratedSymbol: null, + lineNumber: null, + range: null, + target: null, +} as const satisfies Record; + +export const lineDirectionDefaultSpokenForms = { + modulo100: "row", + relativeUp: "up", + relativeDown: "down", +} as const; diff --git a/packages/lib-common/src/references/spokenForms/numberDefaultSpokenForms.ts b/packages/lib-common/src/references/spokenForms/numberDefaultSpokenForms.ts new file mode 100644 index 00000000000..5c6226c00b0 --- /dev/null +++ b/packages/lib-common/src/references/spokenForms/numberDefaultSpokenForms.ts @@ -0,0 +1,126 @@ +export const numberDefaultSpokenForms = [ + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "ten", + "eleven", + "twelve", + "thirteen", + "fourteen", + "fifteen", + "sixteen", + "seventeen", + "eighteen", + "nineteen", + "twenty", + "twenty one", + "twenty two", + "twenty three", + "twenty four", + "twenty five", + "twenty six", + "twenty seven", + "twenty eight", + "twenty nine", + "thirty", + "thirty one", + "thirty two", + "thirty three", + "thirty four", + "thirty five", + "thirty six", + "thirty seven", + "thirty eight", + "thirty nine", + "forty", + "forty one", + "forty two", + "forty three", + "forty four", + "forty five", + "forty six", + "forty seven", + "forty eight", + "forty nine", + "fifty", + "fifty one", + "fifty two", + "fifty three", + "fifty four", + "fifty five", + "fifty six", + "fifty seven", + "fifty eight", + "fifty nine", + "sixty", + "sixty one", + "sixty two", + "sixty three", + "sixty four", + "sixty five", + "sixty six", + "sixty seven", + "sixty eight", + "sixty nine", + "seventy", + "seventy one", + "seventy two", + "seventy three", + "seventy four", + "seventy five", + "seventy six", + "seventy seven", + "seventy eight", + "seventy nine", + "eighty", + "eighty one", + "eighty two", + "eighty three", + "eighty four", + "eighty five", + "eighty six", + "eighty seven", + "eighty eight", + "eighty nine", + "ninety", + "ninety one", + "ninety two", + "ninety three", + "ninety four", + "ninety five", + "ninety six", + "ninety seven", + "ninety eight", + "ninety nine", +]; + +export const ordinalDefaultSpokenForms = [ + "zeroth", + "first", + "second", + "third", + "fourth", + "fifth", + "sixth", + "seventh", + "eighth", + "ninth", + "tenth", + "eleventh", + "twelfth", + "thirteenth", + "fourteenth", + "fifteenth", + "sixteenth", + "seventeenth", + "eighteenth", + "nineteenth", + "twentieth", +]; diff --git a/packages/lib-engine/src/customCommandGrammar/lexer.ts b/packages/lib-engine/src/customCommandGrammar/lexer.ts index 29834ead999..a8fdab30100 100644 --- a/packages/lib-engine/src/customCommandGrammar/lexer.ts +++ b/packages/lib-engine/src/customCommandGrammar/lexer.ts @@ -3,12 +3,12 @@ import type { InsertionMode, } from "@cursorless/lib-common"; import { - connectiveSpokenForms, + connectiveDefaultSpokenForms, + markDefaultSpokenForms, simpleActionNames, simpleScopeTypeTypes, surroundingPairNames, } from "@cursorless/lib-common"; -import { marks } from "../generateSpokenForm/defaultSpokenForms/marks"; import { defaultSpokenFormMap } from "../spokenForms/defaultSpokenFormMap"; import { CommandLexer } from "./CommandLexer"; @@ -50,7 +50,7 @@ const insertionModes: InsertionMode[] = ["before", "after", "to"]; for (const insertionMode of insertionModes) { const spokenForm = - connectiveSpokenForms[ + connectiveDefaultSpokenForms[ insertionMode === "to" ? "sourceDestinationConnective" : insertionMode ]; tokens[spokenForm] = { @@ -80,7 +80,7 @@ for (const pairedDelimiter of surroundingPairNames) { } } -for (const [mark, spokenForm] of Object.entries(marks)) { +for (const [mark, spokenForm] of Object.entries(markDefaultSpokenForms)) { if (spokenForm != null) { tokens[spokenForm] = { type: "simpleMarkType", diff --git a/packages/lib-engine/src/generateSpokenForm/defaultSpokenForms/marks.ts b/packages/lib-engine/src/generateSpokenForm/defaultSpokenForms/marks.ts index 3741fd6b879..30ddc9a1360 100644 --- a/packages/lib-engine/src/generateSpokenForm/defaultSpokenForms/marks.ts +++ b/packages/lib-engine/src/generateSpokenForm/defaultSpokenForms/marks.ts @@ -1,58 +1,10 @@ -import type { PartialMark } from "@cursorless/lib-common"; - -const hatColors: Record = { - blue: "blue", - green: "green", - red: "red", - pink: "pink", - yellow: "yellow", - userColor1: "navy", - userColor2: "apricot", - userColor3: "user color three", - userColor4: "user color four", - - default: null, -}; - -const hatShapes: Record = { - ex: "ex", - fox: "fox", - wing: "wing", - hole: "hole", - frame: "frame", - curve: "curve", - eye: "eye", - play: "play", - crosshairs: "cross", - bolt: "bolt", - - default: null, -}; - -type MarkType = PartialMark["type"]; - -export const marks = { - cursor: "this", - that: "that", - source: "source", - nothing: "nothing", - - keyboard: null, - explicit: null, - decoratedSymbol: null, - lineNumber: null, - range: null, - target: null, -} as const satisfies Record; - -export const lineDirections = { - modulo100: "row", - relativeUp: "up", - relativeDown: "down", -}; +import { + hatColorDefaultSpokenForms, + hatShapeDefaultSpokenForms, +} from "@cursorless/lib-common"; export function hatColorToSpokenForm(color: string): string { - const result = hatColors[color]; + const result = hatColorDefaultSpokenForms[color]; if (result == null) { throw new Error(`Unknown hat color '${color}'`); } @@ -60,7 +12,7 @@ export function hatColorToSpokenForm(color: string): string { } export function hatShapeToSpokenForm(shape: string): string { - const result = hatShapes[shape]; + const result = hatShapeDefaultSpokenForms[shape]; if (result == null) { throw new Error(`Unknown hat shape '${shape}'`); } diff --git a/packages/lib-engine/src/generateSpokenForm/defaultSpokenForms/numbers.ts b/packages/lib-engine/src/generateSpokenForm/defaultSpokenForms/numbers.ts index 2330dd06911..6683c2aa26d 100644 --- a/packages/lib-engine/src/generateSpokenForm/defaultSpokenForms/numbers.ts +++ b/packages/lib-engine/src/generateSpokenForm/defaultSpokenForms/numbers.ts @@ -1,132 +1,10 @@ -const numbers = [ - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "ten", - "eleven", - "twelve", - "thirteen", - "fourteen", - "fifteen", - "sixteen", - "seventeen", - "eighteen", - "nineteen", - "twenty", - "twenty one", - "twenty two", - "twenty three", - "twenty four", - "twenty five", - "twenty six", - "twenty seven", - "twenty eight", - "twenty nine", - "thirty", - "thirty one", - "thirty two", - "thirty three", - "thirty four", - "thirty five", - "thirty six", - "thirty seven", - "thirty eight", - "thirty nine", - "forty", - "forty one", - "forty two", - "forty three", - "forty four", - "forty five", - "forty six", - "forty seven", - "forty eight", - "forty nine", - "fifty", - "fifty one", - "fifty two", - "fifty three", - "fifty four", - "fifty five", - "fifty six", - "fifty seven", - "fifty eight", - "fifty nine", - "sixty", - "sixty one", - "sixty two", - "sixty three", - "sixty four", - "sixty five", - "sixty six", - "sixty seven", - "sixty eight", - "sixty nine", - "seventy", - "seventy one", - "seventy two", - "seventy three", - "seventy four", - "seventy five", - "seventy six", - "seventy seven", - "seventy eight", - "seventy nine", - "eighty", - "eighty one", - "eighty two", - "eighty three", - "eighty four", - "eighty five", - "eighty six", - "eighty seven", - "eighty eight", - "eighty nine", - "ninety", - "ninety one", - "ninety two", - "ninety three", - "ninety four", - "ninety five", - "ninety six", - "ninety seven", - "ninety eight", - "ninety nine", -]; - -const ordinals = [ - "zeroth", - "first", - "second", - "third", - "fourth", - "fifth", - "sixth", - "seventh", - "eighth", - "ninth", - "tenth", - "eleventh", - "twelfth", - "thirteenth", - "fourteenth", - "fifteenth", - "sixteenth", - "seventeenth", - "eighteenth", - "nineteenth", - "twentieth", -]; +import { + numberDefaultSpokenForms, + ordinalDefaultSpokenForms, +} from "@cursorless/lib-common"; export function numberToSpokenForm(number: number): string { - const result = numbers[number]; + const result = numberDefaultSpokenForms[number]; if (result == null) { throw new Error(`Unknown number '${number}'`); } @@ -134,7 +12,7 @@ export function numberToSpokenForm(number: number): string { } export function ordinalToSpokenForm(ordinal: number): string { - const result = ordinals[ordinal]; + const result = ordinalDefaultSpokenForms[ordinal]; if (result == null) { throw new Error(`Unknown ordinal '${ordinal}'`); } diff --git a/packages/lib-engine/src/generateSpokenForm/generateSpokenForm.ts b/packages/lib-engine/src/generateSpokenForm/generateSpokenForm.ts index ccc75ef8a2c..bb445427a4f 100644 --- a/packages/lib-engine/src/generateSpokenForm/generateSpokenForm.ts +++ b/packages/lib-engine/src/generateSpokenForm/generateSpokenForm.ts @@ -11,7 +11,7 @@ import type { } from "@cursorless/lib-common"; import { camelCaseToAllDown, - connectiveSpokenForms, + connectiveDefaultSpokenForms, DOCS_URL, } from "@cursorless/lib-common"; import type { SpokenFormMap } from "../spokenForms/SpokenFormMap"; @@ -139,7 +139,7 @@ export class SpokenFormGenerator { return [ this.spokenFormMap.action[action.name], this.handleTarget(action.target1), - connectiveSpokenForms.swapConnective, + connectiveDefaultSpokenForms.swapConnective, this.handleTarget(action.target2), ]; @@ -228,7 +228,7 @@ export class SpokenFormGenerator { i === 0 ? this.handleTarget(element) : [ - connectiveSpokenForms.listConnective, + connectiveDefaultSpokenForms.listConnective, this.handleTarget(element), ], ); @@ -267,7 +267,7 @@ export class SpokenFormGenerator { i === 0 ? this.handleDestination(destination) : [ - connectiveSpokenForms.listConnective, + connectiveDefaultSpokenForms.listConnective, this.handleDestination(destination), ], ); @@ -288,11 +288,11 @@ export class SpokenFormGenerator { private handleInsertionMode(insertionMode: InsertionMode): string { switch (insertionMode) { case "to": - return connectiveSpokenForms.sourceDestinationConnective; + return connectiveDefaultSpokenForms.sourceDestinationConnective; case "before": - return connectiveSpokenForms.before; + return connectiveDefaultSpokenForms.before; case "after": - return connectiveSpokenForms.after; + return connectiveDefaultSpokenForms.after; // No default } } diff --git a/packages/lib-engine/src/generateSpokenForm/getRangeConnective.ts b/packages/lib-engine/src/generateSpokenForm/getRangeConnective.ts index 96bad4d267b..00df734b145 100644 --- a/packages/lib-engine/src/generateSpokenForm/getRangeConnective.ts +++ b/packages/lib-engine/src/generateSpokenForm/getRangeConnective.ts @@ -1,5 +1,5 @@ import type { PartialRangeType } from "@cursorless/lib-common"; -import { connectiveSpokenForms } from "@cursorless/lib-common"; +import { connectiveDefaultSpokenForms } from "@cursorless/lib-common"; import { NoSpokenFormError } from "./NoSpokenFormError"; export function getRangeConnective( @@ -8,19 +8,19 @@ export function getRangeConnective( type?: PartialRangeType, ): string { const prefix = - type === "vertical" ? `${connectiveSpokenForms.verticalRange} ` : ""; + type === "vertical" ? `${connectiveDefaultSpokenForms.verticalRange} ` : ""; if (excludeAnchor && excludeActive) { - return prefix + connectiveSpokenForms.rangeExclusive; + return prefix + connectiveDefaultSpokenForms.rangeExclusive; } if (excludeAnchor) { throw new NoSpokenFormError("Range exclude anchor"); } if (excludeActive) { - return prefix + connectiveSpokenForms.rangeExcludingEnd; + return prefix + connectiveDefaultSpokenForms.rangeExcludingEnd; } if (type === "vertical") { // "slice", but could have been "slice past" - return connectiveSpokenForms.verticalRange; + return connectiveDefaultSpokenForms.verticalRange; } - return connectiveSpokenForms.rangeInclusive; + return connectiveDefaultSpokenForms.rangeInclusive; } diff --git a/packages/lib-engine/src/generateSpokenForm/primitiveTargetToSpokenForm.ts b/packages/lib-engine/src/generateSpokenForm/primitiveTargetToSpokenForm.ts index 6d9cabe09bc..4b39be7d965 100644 --- a/packages/lib-engine/src/generateSpokenForm/primitiveTargetToSpokenForm.ts +++ b/packages/lib-engine/src/generateSpokenForm/primitiveTargetToSpokenForm.ts @@ -6,12 +6,14 @@ import type { RelativeScopeModifier, ScopeType, } from "@cursorless/lib-common"; -import { connectiveSpokenForms } from "@cursorless/lib-common"; +import { + connectiveDefaultSpokenForms, + lineDirectionDefaultSpokenForms, + markDefaultSpokenForms, +} from "@cursorless/lib-common"; import { hatColorToSpokenForm, hatShapeToSpokenForm, - lineDirections, - marks, } from "./defaultSpokenForms/marks"; import { numberToSpokenForm, @@ -167,8 +169,8 @@ export class PrimitiveTargetSpokenFormGenerator { if (modifier.length === 1) { const direction = modifier.direction === "forward" - ? connectiveSpokenForms.forward - : connectiveSpokenForms.backward; + ? connectiveDefaultSpokenForms.forward + : connectiveDefaultSpokenForms.backward; // token forward/backward return [isEvery, scope, direction]; @@ -184,7 +186,12 @@ export class PrimitiveTargetSpokenFormGenerator { } // two tokens backward - return [isEvery, length, scopePlural, connectiveSpokenForms.backward]; + return [ + isEvery, + length, + scopePlural, + connectiveDefaultSpokenForms.backward, + ]; } private handleRelativeScopeExclusive( @@ -193,8 +200,8 @@ export class PrimitiveTargetSpokenFormGenerator { const scope = this.handleScopeType(modifier.scopeType); const direction = modifier.direction === "forward" - ? connectiveSpokenForms.next - : connectiveSpokenForms.previous; + ? connectiveDefaultSpokenForms.next + : connectiveDefaultSpokenForms.previous; const isEvery = modifier.isEvery ? this.spokenFormMap.simpleModifier.everyScope : []; @@ -320,7 +327,7 @@ export class PrimitiveTargetSpokenFormGenerator { throw new NoSpokenFormError(`Mark '${mark.type}'`); default: - return [marks[mark.type]]; + return [markDefaultSpokenForms[mark.type]]; } } @@ -331,7 +338,7 @@ export class PrimitiveTargetSpokenFormGenerator { case "modulo100": { // row/ five return [ - lineDirections.modulo100, + lineDirectionDefaultSpokenForms.modulo100, numberToSpokenForm(mark.lineNumber + 1), ]; } @@ -339,8 +346,8 @@ export class PrimitiveTargetSpokenFormGenerator { // up/down five return [ mark.lineNumber < 0 - ? lineDirections.relativeUp - : lineDirections.relativeDown, + ? lineDirectionDefaultSpokenForms.relativeUp + : lineDirectionDefaultSpokenForms.relativeDown, numberToSpokenForm(Math.abs(mark.lineNumber)), ]; } diff --git a/packages/lib-engine/src/spokenForms/defaultSpokenFormMapCore.ts b/packages/lib-engine/src/spokenForms/defaultSpokenFormMapCore.ts index a0a213b28c3..ed2045ece2a 100644 --- a/packages/lib-engine/src/spokenForms/defaultSpokenFormMapCore.ts +++ b/packages/lib-engine/src/spokenForms/defaultSpokenFormMapCore.ts @@ -1,23 +1,73 @@ import { actionNames, actionReferences, - modifierExtraReferenceIds, - modifierExtraReferences, + graphemeDefaultSpokenForms, modifierReferences, - simpleModifierReferenceIds, + pairedDelimiterReferences, simpleScopeTypeTypes, scopeReferences, + connectiveDefaultSpokenForms, +} from "@cursorless/lib-common"; +import type { + SpokenFormMapKeyTypes, + SpokenFormReference, } from "@cursorless/lib-common"; -import type { SpokenFormReference } from "@cursorless/lib-common"; import type { DefaultSpokenFormMapDefinition, DefaultSpokenFormMapEntry, } from "./defaultSpokenFormMap.types"; -import { graphemeDefaultSpokenForms } from "./graphemes"; -import { isPrivate } from "./spokenFormMapUtil"; type DefaultSpokenForm = string | DefaultSpokenFormMapEntry; +const simpleModifierReferenceIds = [ + "excludeInterior", + "toRawSelection", + "leading", + "trailing", + "keepContentFilter", + "keepEmptyFilter", + "inferPreviousMark", + "startOf", + "endOf", + "interiorOnly", + "visible", + "extendThroughStartOf", + "extendThroughEndOf", + "everyScope", +] as const satisfies readonly SpokenFormMapKeyTypes["simpleModifier"][]; + +const modifierExtraReferenceIds = [ + "first", + "last", + "previous", + "next", + "forward", + "backward", + "ancestor", +] as const satisfies readonly SpokenFormMapKeyTypes["modifierExtra"][]; + +const modifierExtraReferences = { + first: { + defaultSpokenForm: connectiveDefaultSpokenForms.first, + }, + last: { + defaultSpokenForm: connectiveDefaultSpokenForms.last, + }, + previous: { + defaultSpokenForm: connectiveDefaultSpokenForms.previous, + }, + next: { + defaultSpokenForm: connectiveDefaultSpokenForms.next, + }, + forward: { + defaultSpokenForm: connectiveDefaultSpokenForms.forward, + }, + backward: { + defaultSpokenForm: connectiveDefaultSpokenForms.backward, + }, + ancestor: modifierReferences.ancestor, +} satisfies Record; + function getDefaultSpokenForm( reference: SpokenFormReference, ): DefaultSpokenForm { @@ -50,34 +100,26 @@ function getDefaultSpokenFormMap( ) as Record; } +function getCompleteDefaultSpokenFormMap< + References extends Readonly>, +>( + references: References, +): Readonly> { + return Object.fromEntries( + Object.entries(references).map(([key, reference]) => [ + key, + getDefaultSpokenForm(reference), + ]), + ) as Record; +} + /** * This map contains the default spoken forms for all our speakable entities. - * Actions, scopes, and modifiers are constructed from their reference - * definitions. Paired delimiters and graphemes remain defined here until they - * have corresponding reference definitions. + * Actions, scopes, modifiers, and paired delimiters are constructed from their + * reference definitions. Graphemes remain defined directly. */ export const defaultSpokenFormMapCore: DefaultSpokenFormMapDefinition = { - pairedDelimiter: { - curlyBrackets: "curly", - angleBrackets: "diamond", - escapedDoubleQuotes: "escaped quad", - escapedSingleQuotes: "escaped twin", - escapedParentheses: "escaped round", - escapedSquareBrackets: "escaped box", - doubleQuotes: "quad", - parentheses: "round", - backtickQuotes: "skis", - squareBrackets: "box", - singleQuotes: "twin", - tripleDoubleQuotes: isPrivate("triple quad"), - tripleSingleQuotes: isPrivate("triple twin"), - tripleBacktickQuotes: isPrivate("triple skis"), - any: "pair", - string: "string", - whitespace: "void", - - collectionBoundary: isPrivate("collection boundary"), - }, + pairedDelimiter: getCompleteDefaultSpokenFormMap(pairedDelimiterReferences), simpleScopeTypeType: getDefaultSpokenFormMap( simpleScopeTypeTypes, diff --git a/packages/tool-meta-updater/src/updateReferenceMdx.ts b/packages/tool-meta-updater/src/updateReferenceMdx.ts index f0ca6e1aad6..d8d08a992ba 100644 --- a/packages/tool-meta-updater/src/updateReferenceMdx.ts +++ b/packages/tool-meta-updater/src/updateReferenceMdx.ts @@ -71,17 +71,17 @@ export function updateReferenceMdx( expected.push(""); } - if (entry.examples.length > 0) { - expected.push(`## Examples`, ""); - for (const example of entry.examples) { - const command = injectSpokenForm( - example.command, - entry.defaultSpokenForm, - ); - expected.push(`- \`"${command}"\`: ${example.description}`); - } - expected.push(""); - } + // if (entry.examples.length > 0) { + // expected.push(`## Examples`, ""); + // for (const example of entry.examples) { + // const command = injectSpokenForm( + // example.command, + // entry.defaultSpokenForm, + // ); + // expected.push(`- \`"${command}"\`: ${example.description}`); + // } + // expected.push(""); + // } if (isScope) { expected.push(``, ""); From 7fe0681d7ecb883784f297e41cadb85d60fae5d0 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 29 Aug 2026 14:03:33 +0200 Subject: [PATCH 4/4] small fix --- .../lib-engine/src/generateSpokenForm/generateSpokenForm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lib-engine/src/generateSpokenForm/generateSpokenForm.ts b/packages/lib-engine/src/generateSpokenForm/generateSpokenForm.ts index bb445427a4f..b71300aad43 100644 --- a/packages/lib-engine/src/generateSpokenForm/generateSpokenForm.ts +++ b/packages/lib-engine/src/generateSpokenForm/generateSpokenForm.ts @@ -153,7 +153,7 @@ export class SpokenFormGenerator { return [ this.spokenFormMap.action[action.name], this.handleTarget(action.callee), - "on", + connectiveDefaultSpokenForms.on, this.handleTarget(action.argument), ];