diff --git a/packages/app-web-docs/src/docs/components/ScopeVisualizer.tsx b/packages/app-web-docs/src/docs/components/ScopeVisualizer.tsx index 1aef0c21aa..b5a2ec6917 100644 --- a/packages/app-web-docs/src/docs/components/ScopeVisualizer.tsx +++ b/packages/app-web-docs/src/docs/components/ScopeVisualizer.tsx @@ -318,7 +318,8 @@ function getScopeFixtures( for (const f of scope.facets) { f.fixtures.sort(nameComparator); } - if (scopeReferences[scope.scopeTypeType].private) { + const scopeRef = scopeReferences[scope.scopeTypeType]; + if ("private" in scopeRef && scopeRef.private) { result.internal.push(scope); } else { result.public.push(scope); 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 2ef5495c62..4955300700 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 091b51f8fb..648bd030fa 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 5e172dc0d2..c4a72ff5a2 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 eaa31b399e..d11ebe9d60 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 14e970b177..ea5025703f 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 ad44ceedac..f69b65f1fa 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,8 @@ 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. +- `"call blue air on green bat"`: Inserts a call to the token containing letter 'a' with a blue hat on the token containing letter 'b' with a green hat. 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 6a58fc9242..022aa8324c 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"`: Changes the token containing letter 'a' with a blue hat by clearing it and leaving 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 7ed55fd515..2fab67a9ea 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 f07c6a76cb..2ef9b4ffbf 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 94bd0ebc64..4d64acae30 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 five"`: Decrements the number at the token containing number '5' 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 4893b2d597..a81e7306a3 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 1c7e3550f7..023b43157d 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 8f75f65a37..bab048030d 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 fbbb8dcabf..26bcaae49f 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 value blue air"`: Extracts the value 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 5fa853c783..19a6023012 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 2a9948cb68..0e6fb42c36 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 5d31ef2123..3a9452ec5d 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 d553003331..e134b331f9 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 30ff29d1a5..f50c100bc7 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 52517997f1..5fee9a0eca 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 2fbbc64324..57f7d45d2c 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 f4332d73e0..645d0a71fe 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 f36385c572..a3d85b5c2b 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 89be47315d..a351e1e05c 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 2f5459c30a..1db746d7a4 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 f1f6ec0edc..c66ffa333f 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 eb315f8df2..93e18c442a 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 five"`: Increments the token containing number '5' 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 48437ec929..594f18903f 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 04a331ad6e..f78fb82401 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 c605b362aa..47aa0fcfb5 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 a102210e61..cca53842d5 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineAfter.mdx @@ -1,4 +1,4 @@ -# Insert empty line after +# Insert empty line/scope after Cursorless ID: `insertEmptyLineAfter` @@ -8,4 +8,9 @@ Default: `float` ## Syntax -- float ``: Insert empty line after ``. +- float ``: Insert empty line/scope 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 4e692773ff..77ae0a3f2e 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLineBefore.mdx @@ -1,4 +1,4 @@ -# Insert empty line before +# Insert empty line/scope before Cursorless ID: `insertEmptyLineBefore` @@ -8,4 +8,9 @@ Default: `drop` ## Syntax -- drop ``: Insert empty line before ``. +- drop ``: Insert empty line/scope 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 6fee99b741..c3ddcf63d2 100644 --- a/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx +++ b/packages/app-web-docs/src/docs/user/actions/insertEmptyLinesAround.mdx @@ -1,4 +1,4 @@ -# Insert empty lines around +# Insert empty lines/scopes around Cursorless ID: `insertEmptyLinesAround` @@ -8,4 +8,9 @@ Default: `puff` ## Syntax -- puff ``: Insert empty lines around ``. +- puff ``: Insert empty lines/scopes 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 4918224159..440b0ef070 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 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 705270bcd5..da549c32fd 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 8520895b34..64f845907f 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,8 @@ Default: `move` - move ``: Move `` to selection. - move `` ``: Move `` to ``. + +## Examples + +- `"move blue air"`: Moves the token containing letter 'a' with a blue hat to the current selection. +- `"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 d4cf8a9e82..00c3482fa5 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 c84db27f07..a100766af2 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 59da8e93ea..dd01d90cc4 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 68ee22b054..52b7817073 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/remove.mdx b/packages/app-web-docs/src/docs/user/actions/remove.mdx index 4834da3e06..7eb95915ec 100644 --- a/packages/app-web-docs/src/docs/user/actions/remove.mdx +++ b/packages/app-web-docs/src/docs/user/actions/remove.mdx @@ -11,3 +11,7 @@ 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 b0594228a6..21eee66011 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 f66b2a78d5..b61ebf1c81 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,8 @@ Default: `bring` - bring ``: Insert copy of `` at selection. - bring `` ``: Copy `` to ``. + +## Examples + +- `"bring blue air"`: Inserts a copy of the token containing letter 'a' with a blue hat at the current selection. +- `"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 3e5c3f4588..e8727c48ae 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 551d95e992..1f58487ef1 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 9d4f4b643e..0dfdf181a6 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 28410df99f..e7534e0f19 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 fea3f9e040..fc8193f853 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 4c63dd8a87..0bdd0887eb 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 8f1a7f973e..78e9f581bc 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 c9321d93ca..7c3420ed84 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 70b9e362bd..7b1efebc20 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 6336804ff6..c0084042a3 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 90a3707207..e9f6bef7e8 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 8ba5cd587d..b1b9680d61 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 a246baf259..beaa0f7156 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 6bb4800941..1ddab31593 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 13df173051..97a180d2eb 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 f576a458fb..5168492ced 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 bae5c1dae6..defd287323 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,8 @@ Default: `swap` - swap with ``: Swap selection with ``. - swap `` with ``: Swap `` with ``. + +## Examples + +- `"swap with blue air"`: Swaps the current selection with the token containing letter 'a' with a blue hat. +- `"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 6d0cd6a57b..df4785adda 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,8 @@ 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. +- `"break point token blue air"`: Toggles an inline breakpoint at 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 4f58da1682..b4a1c698a8 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 4fbaf19f1f..7afa8567b9 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 eba21f3226..daa8755b46 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 1244c6e5ce..021f846061 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 ac2c22cde8..4c22f1e977 100644 --- a/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx +++ b/packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx @@ -8,4 +8,8 @@ Default: `grand` ## Syntax -- grand ``: Grandparent containing instance of ``. +- grand ``: Parent of the 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 7656963f6e..15a2f1ba80 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 f5854c0d55..89f547f429 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 f8add57226..de643fa136 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 6eb3e90a79..30f084061c 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 0b503d7400..c80f27f857 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,8 @@ 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. +- `"take tail state blue air"`: Selects from the token containing letter 'a' with a blue hat through the end of its containing statement. 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 529b192626..095ede9328 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,8 @@ 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. +- `"take head state blue air"`: Selects from the token containing letter 'a' with a blue hat through the start of its containing statement. 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 5d16081873..96915f09a4 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 82a90963ba..5ffb513dd3 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 b7016d7a34..63ed40fc1c 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 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 ad485607a5..5dc413b341 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 8d2f97d26a..cb68bfe9cf 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 811bda5be9..b7889ac23a 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,12 @@ 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 third last state"`: Selects the third-to-last statement in the iteration scope. +- `"take first three states"`: Selects a contiguous range containing the first three statements in the iteration scope. +- `"take every first three states"`: Selects the first three statements in the iteration scope as individual targets. +- `"take last three states"`: Selects a contiguous range containing the last three statements in the iteration scope. +- `"take every last three states"`: Selects the last three statements in the iteration scope as individual targets. 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 17f60ebbcd..7434e66f5b 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,20 @@ 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 previous state blue air"`: Selects the previous statement before the statement containing the token containing letter 'a' with a blue hat. +- `"take third previous state blue air"`: Selects the third statement before the statement containing the token containing letter 'a' with a blue hat. +- `"take next state blue air"`: Selects the next statement after the statement containing the token containing letter 'a' with a blue hat. +- `"take third next state blue air"`: Selects the third statement after the statement containing the token containing letter 'a' with a blue hat. +- `"take state backward blue air"`: Selects the statement containing the token containing letter 'a' with a blue hat, searching backward. +- `"take state forward blue air"`: Selects the statement containing the token containing letter 'a' with a blue hat, searching forward. +- `"take three states backward blue air"`: Selects three statements, including the statement containing the token containing letter 'a' with a blue hat, searching backward, as a contiguous range. +- `"take every three states backward blue air"`: Selects three statements, including the statement containing the token containing letter 'a' with a blue hat, searching backward, as individual targets. +- `"take three states blue air"`: Selects three statements, including the statement containing the token containing letter 'a' with a blue hat, searching forward, as a contiguous range. +- `"take every three states blue air"`: Selects three statements, including the statement containing the token containing letter 'a' with a blue hat, searching forward, as individual targets. +- `"take previous three states blue air"`: Selects the previous three statements before the statement containing the token containing letter 'a' with a blue hat as a contiguous range. +- `"take every previous three states blue air"`: Selects the previous three statements before the statement containing the token containing letter 'a' with a blue hat as individual targets. +- `"take next three states blue air"`: Selects the next three statements after the statement containing the token containing letter 'a' with a blue hat as a contiguous range. +- `"take every next three states blue air"`: Selects the next three statements after the statement containing the token containing letter 'a' with a blue hat as individual targets. 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 aa7ea21daa..3915ad0189 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 79aa46b991..0ff532f6d5 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 cdf6807416..85484fba89 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 6678e13c66..d34ec5664b 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 a47bd16c86..e3f6143a2d 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 081766e5bc..6e18a98d5c 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 a38f9d6b49..5ec7de7b83 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 38eb84adaa..526fd9020e 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 4aac14a632..173bb6e09d 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 a40429b28f..f35c193d32 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 6319e1e520..08f5cf465c 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 e40992795b..5dadb357f8 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 952eb56ad2..e48aac11c6 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 first char blue air"`: Selects the first character in 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 54732d6896..fad252195e 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 d7009742fe..73d6c9046d 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 ae9588c548..76b0b6abf7 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 cfaf4c2b0c..02c53d9f93 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 61f1ac178a..e7a027ee13 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 2dd7896494..a1fc29ca6d 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 e7f45152b0..23493b7346 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 e1267b8be0..71d9f6ae1a 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 a1b80532fe..059231ca2d 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 dae800b9b3..1c529915ea 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 ba1fc8cd8b..20ef1a7903 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 cc809e1443..c7d771f61b 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 7ccaa99212..0f559d5c2d 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 1de8ee15a9..283590752d 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 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 eb89bd9c7a..eaa35adf9d 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 32dd292d0e..996412013b 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 e90bb9e002..94bf021fa7 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 e8c8689dee..484270572a 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 e160b1350f..640abfe242 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 8aae8ba45c..c4485d3e54 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 fb1bdd4313..b347378b88 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 adcc4d9545..a51bac0e96 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 00893b4277..f3679526c9 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 4c191cd44a..8e412c7f2e 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 43d4cfecd7..88da818212 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 51dc0feed1..26e05a5c07 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 42cd85460d..59d2c35914 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 2fc5a46ec9..6c51f748b7 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 1d3f7c5b97..0bb2cd5324 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 7af86a3378..30212543db 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 aeef649dfa..b3af8a9c57 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 b92e71d531..0eca75159f 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 4199611ace..51a108d0df 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 cea79f312e..5a8f2883b4 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 f39cc5f990..d79233070f 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 1149a0905c..87353e50fb 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 f5e777bdb3..2811e3537e 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 a9b721ab0e..5331db88a4 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 6e1e73abfc..c603393bdf 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 a60e7c8714..ffec348612 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 6df78a5f66..7b540f1ffb 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 f1f0f05eac..c23bc71f0a 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 ad20363905..1bee170266 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 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 e618496344..90f5497a83 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 ec8afaf7b7..677fb5e078 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 1a38067803..74e5d760eb 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 340febe9d2..5c61cffd79 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 9051496d9c..5a1e7210ec 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 first sub blue air"`: Selects the first sub token word in 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 8218dfab62..a08c10851d 100644 --- a/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/xmlBothTags.mdx @@ -10,6 +10,10 @@ Default: `tags` ## Syntax -- tags: XML both tags. +- tags: XML start and end tags. + +## Examples + +- `"take tags blue air"`: Selects both tags of the XML element 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 f2582bdacd..db07d3a776 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 8e28752f35..a572670448 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 09bd6c3e28..199f512af6 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 57079efd57..eb077f72d9 100644 --- a/packages/lib-common/src/references/actionReferences.ts +++ b/packages/lib-common/src/references/actionReferences.ts @@ -20,7 +20,6 @@ import { VAR_TARGET_1, VAR_TARGET_2, } from "./constants"; -import { getSpokenForm } from "./getSpokenForm"; import { modifierReferences } from "./modifierReferences"; import { pairedDelimiterReferences } from "./pairedDelimiterReferences"; import type { ReferenceEntry } from "./ReferenceEntry"; @@ -28,15 +27,14 @@ import { scopeReferences } from "./scopeReferences"; 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 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 ITEM = scopeReferences.collectionItem.defaultSpokenForm; +const VALUE = scopeReferences.value.defaultSpokenForm; +const INSTANCE = scopeReferences.instance.defaultSpokenForm; +const FUNCTION = scopeReferences.namedFunction.defaultSpokenForm; +const TOKEN = scopeReferences.token.defaultSpokenForm; +const EVERY = modifierReferences.everyScope.defaultSpokenForm; const WITH = connectiveDefaultSpokenForms.swapConnective; const AFTER = connectiveDefaultSpokenForms.after; const TO = connectiveDefaultSpokenForms.sourceDestinationConnective; @@ -47,10 +45,7 @@ const ON = connectiveDefaultSpokenForms.on; type TalonSideActionType = "applyFormatter" | "nextHomophone"; -export const actionReferences: Record< - ActionType | TalonSideActionType, - ReferenceEntry -> = { +export const actionReferences = { addSelection: { name: "Add selection", defaultSpokenForm: "append", @@ -133,7 +128,7 @@ export const actionReferences: Record< examples: [ { command: DEFAULT_COMMAND, - description: `Deletes the ${TARGET_DESC} and leaves the cursor in its place.`, + description: `Changes the ${TARGET_DESC} by clearing it and leaving the cursor in its place.`, }, ], }, @@ -216,7 +211,7 @@ export const actionReferences: Record< cheatsheet: "Edit new line after", }, { - pattern: DEFAULT_PATTERN_SCOPE, + pattern: `${VAR_SPOKEN_FORM} ${VAR_SCOPE} ${VAR_TARGET}`, description: `Edit new ${VAR_SCOPE} after ${VAR_TARGET}.`, cheatsheet: `Edit new ${VAR_SCOPE} after`, }, @@ -243,7 +238,7 @@ export const actionReferences: Record< cheatsheet: "Edit new line before", }, { - pattern: DEFAULT_PATTERN_SCOPE, + pattern: `${VAR_SPOKEN_FORM} ${VAR_SCOPE} ${VAR_TARGET}`, description: `Edit new ${VAR_SCOPE} before ${VAR_TARGET}.`, cheatsheet: `Edit new ${VAR_SCOPE} before`, }, @@ -290,8 +285,8 @@ export const actionReferences: Record< ], examples: [ { - command: `${VAR_SPOKEN_FORM} ${CALL} ${TARGET}`, - description: `Extracts the function call containing the ${TARGET_DESC} into a variable.`, + command: `${VAR_SPOKEN_FORM} ${VALUE} ${TARGET}`, + description: `Extracts the value containing the ${TARGET_DESC} into a variable.`, }, ], }, @@ -534,13 +529,13 @@ export const actionReferences: Record< ], }, insertEmptyLineAfter: { - name: "Insert empty line after", + name: "Insert empty line/scope after", defaultSpokenForm: "float", syntaxes: [ { pattern: DEFAULT_PATTERN, - description: `Insert empty line after ${VAR_TARGET}.`, - cheatsheet: "Insert empty line after", + description: `Insert empty line/scope after ${VAR_TARGET}.`, + cheatsheet: "Insert empty line/scope after", }, ], examples: [ @@ -555,13 +550,13 @@ export const actionReferences: Record< ], }, insertEmptyLineBefore: { - name: "Insert empty line before", + name: "Insert empty line/scope before", defaultSpokenForm: "drop", syntaxes: [ { pattern: DEFAULT_PATTERN, - description: `Insert empty line before ${VAR_TARGET}.`, - cheatsheet: "Insert empty line before", + description: `Insert empty line/scope before ${VAR_TARGET}.`, + cheatsheet: "Insert empty line/scope before", }, ], examples: [ @@ -576,13 +571,13 @@ export const actionReferences: Record< ], }, insertEmptyLinesAround: { - name: "Insert empty lines around", + name: "Insert empty lines/scopes around", defaultSpokenForm: "puff", syntaxes: [ { pattern: DEFAULT_PATTERN, - description: `Insert empty lines around ${VAR_TARGET}.`, - cheatsheet: "Insert empty lines around", + description: `Insert empty lines/scopes around ${VAR_TARGET}.`, + cheatsheet: "Insert empty lines/scopes around", }, ], examples: [ @@ -942,6 +937,10 @@ export const actionReferences: Record< command: DEFAULT_COMMAND, description: `Toggles a breakpoint on the line containing the ${TARGET_DESC}.`, }, + { + command: `${VAR_SPOKEN_FORM} ${TOKEN} ${TARGET}`, + description: `Toggles an inline breakpoint at the ${TARGET_DESC}.`, + }, ], }, toggleLineComment: { @@ -998,6 +997,10 @@ export const actionReferences: Record< command: DEFAULT_COMMAND, description: `Inserts a call to the ${TARGET_DESC} at the current selection.`, }, + { + command: `${VAR_SPOKEN_FORM} ${TARGET} ${ON} ${TARGET_2}`, + description: `Inserts a call to the ${TARGET_DESC} on the ${TARGET_2_DESC}.`, + }, ], }, generateSnippet: { @@ -1068,6 +1071,10 @@ export const actionReferences: Record< }, ], examples: [ + { + command: DEFAULT_COMMAND, + description: `Moves the ${TARGET_DESC} to the current selection.`, + }, { command: `${VAR_SPOKEN_FORM} ${TARGET} ${AFTER} ${TARGET_2}`, description: `Moves the ${TARGET_DESC} to after the ${TARGET_2_DESC}.`, @@ -1107,6 +1114,10 @@ export const actionReferences: Record< }, ], examples: [ + { + command: DEFAULT_COMMAND, + description: `Inserts a copy of the ${TARGET_DESC} at the current selection.`, + }, { command: `${VAR_SPOKEN_FORM} ${TARGET} ${TO} ${TARGET_2}`, description: `Replaces the ${TARGET_2_DESC} with a copy of the ${TARGET_DESC}.`, @@ -1146,6 +1157,10 @@ export const actionReferences: Record< }, ], examples: [ + { + command: `${VAR_SPOKEN_FORM} ${WITH} ${TARGET}`, + description: `Swaps the current selection with the ${TARGET_DESC}.`, + }, { command: `${VAR_SPOKEN_FORM} ${TARGET} ${WITH} ${TARGET_2}`, description: `Swaps the ${TARGET_DESC} and the ${TARGET_2_DESC}.`, @@ -1290,4 +1305,4 @@ export const actionReferences: Record< syntaxes: [], examples: [], }, -}; +} as const satisfies Record; diff --git a/packages/lib-common/src/references/constants.ts b/packages/lib-common/src/references/constants.ts index 75c0c2fa07..6c1a14397f 100644 --- a/packages/lib-common/src/references/constants.ts +++ b/packages/lib-common/src/references/constants.ts @@ -21,8 +21,8 @@ export const TARGET = `${hatColorDefaultSpokenForms.blue} ${graphemeDefaultSpoke 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"; +export const TARGET_NUMBER = `${hatColorDefaultSpokenForms.blue} ${graphemeDefaultSpokenForms["5"]}`; +export const TARGET_NUMBER_DESC = "token containing number '5' with a blue hat"; // Actions export const SET_SELECTION = "take"; diff --git a/packages/lib-common/src/references/getSpokenForm.ts b/packages/lib-common/src/references/getSpokenForm.ts deleted file mode 100644 index 62fc6ad2ad..0000000000 --- a/packages/lib-common/src/references/getSpokenForm.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { SpokenFormReference } from "./ReferenceEntry"; - -export function getSpokenForm(reference: SpokenFormReference): string { - if (reference.defaultSpokenForm == null) { - throw new Error("Reference has no default spoken form"); - } - - return reference.defaultSpokenForm; -} diff --git a/packages/lib-common/src/references/modifierReferences.ts b/packages/lib-common/src/references/modifierReferences.ts index 04042e8632..707cb70032 100644 --- a/packages/lib-common/src/references/modifierReferences.ts +++ b/packages/lib-common/src/references/modifierReferences.ts @@ -34,10 +34,7 @@ const LAST = connectiveDefaultSpokenForms.last; type AdditionalModifierReferenceType = "ancestor"; -export const modifierReferences: Record< - ModifierType | AdditionalModifierReferenceType, - ReferenceEntry -> = { +export const modifierReferences = { startOf: { name: "Start of", defaultSpokenForm: "start of", @@ -163,8 +160,8 @@ export const modifierReferences: Record< syntaxes: [ { pattern: `${VAR_SPOKEN_FORM} ${VAR_SCOPE}`, - description: `Grandparent containing instance of ${VAR_SCOPE}.`, - cheatsheet: `Grandparent containing instance of ${VAR_SCOPE}`, + description: `Parent of the containing instance of ${VAR_SCOPE}.`, + cheatsheet: `Parent of the containing instance of ${VAR_SCOPE}`, }, ], examples: [ @@ -213,11 +210,31 @@ export const modifierReferences: Record< command: `${SET_SELECTION} ${THIRD} ${STATEMENT}`, description: "Selects the third statement in the iteration scope.", }, + { + command: `${SET_SELECTION} ${THIRD} ${LAST} ${STATEMENT}`, + description: + "Selects the third-to-last 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.", }, + { + command: `${SET_SELECTION} ${EVERY} ${FIRST} ${THREE} ${STATEMENT}s`, + description: + "Selects the first three statements in the iteration scope as individual targets.", + }, + { + command: `${SET_SELECTION} ${LAST} ${THREE} ${STATEMENT}s`, + description: + "Selects a contiguous range containing the last three statements in the iteration scope.", + }, + { + command: `${SET_SELECTION} ${EVERY} ${LAST} ${THREE} ${STATEMENT}s`, + description: + "Selects the last three statements in the iteration scope as individual targets.", + }, ], }, relativeScope: { @@ -295,13 +312,61 @@ export const modifierReferences: Record< }, ], examples: [ + { + command: `${SET_SELECTION} ${PREVIOUS} ${STATEMENT} ${TARGET}`, + description: `Selects the previous statement before the statement containing the ${TARGET_DESC}.`, + }, + { + command: `${SET_SELECTION} ${THIRD} ${PREVIOUS} ${STATEMENT} ${TARGET}`, + description: `Selects the third statement before the statement containing the ${TARGET_DESC}.`, + }, { command: `${SET_SELECTION} ${NEXT} ${STATEMENT} ${TARGET}`, description: `Selects the next statement after the statement containing the ${TARGET_DESC}.`, }, + { + command: `${SET_SELECTION} ${THIRD} ${NEXT} ${STATEMENT} ${TARGET}`, + description: `Selects the third statement after the statement containing the ${TARGET_DESC}.`, + }, + { + command: `${SET_SELECTION} ${STATEMENT} ${BACKWARD} ${TARGET}`, + description: `Selects the statement containing the ${TARGET_DESC}, searching backward.`, + }, + { + command: `${SET_SELECTION} ${STATEMENT} ${FORWARD} ${TARGET}`, + description: `Selects the statement containing the ${TARGET_DESC}, searching forward.`, + }, { command: `${SET_SELECTION} ${THREE} ${STATEMENT}s ${BACKWARD} ${TARGET}`, - description: `Selects three statements as a contiguous range, starting at the ${TARGET_DESC} and going backward.`, + description: `Selects three statements, including the statement containing the ${TARGET_DESC}, searching backward, as a contiguous range.`, + }, + { + command: `${SET_SELECTION} ${EVERY} ${THREE} ${STATEMENT}s ${BACKWARD} ${TARGET}`, + description: `Selects three statements, including the statement containing the ${TARGET_DESC}, searching backward, as individual targets.`, + }, + { + command: `${SET_SELECTION} ${THREE} ${STATEMENT}s ${TARGET}`, + description: `Selects three statements, including the statement containing the ${TARGET_DESC}, searching forward, as a contiguous range.`, + }, + { + command: `${SET_SELECTION} ${EVERY} ${THREE} ${STATEMENT}s ${TARGET}`, + description: `Selects three statements, including the statement containing the ${TARGET_DESC}, searching forward, as individual targets.`, + }, + { + command: `${SET_SELECTION} ${PREVIOUS} ${THREE} ${STATEMENT}s ${TARGET}`, + description: `Selects the previous three statements before the statement containing the ${TARGET_DESC} as a contiguous range.`, + }, + { + command: `${SET_SELECTION} ${EVERY} ${PREVIOUS} ${THREE} ${STATEMENT}s ${TARGET}`, + description: `Selects the previous three statements before the statement containing the ${TARGET_DESC} as individual targets.`, + }, + { + command: `${SET_SELECTION} ${NEXT} ${THREE} ${STATEMENT}s ${TARGET}`, + description: `Selects the next three statements after the statement containing the ${TARGET_DESC} as a contiguous range.`, + }, + { + command: `${SET_SELECTION} ${EVERY} ${NEXT} ${THREE} ${STATEMENT}s ${TARGET}`, + description: `Selects the next three statements after the statement containing the ${TARGET_DESC} as individual targets.`, }, ], }, @@ -325,6 +390,10 @@ export const modifierReferences: Record< command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, description: `Selects from the ${TARGET_DESC} through the start of its line or surrounding pair.`, }, + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${STATEMENT} ${TARGET}`, + description: `Selects from the ${TARGET_DESC} through the start of its containing statement.`, + }, ], }, extendThroughEndOf: { @@ -347,6 +416,10 @@ export const modifierReferences: Record< command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, description: `Selects from the ${TARGET_DESC} through the end of its line or surrounding pair.`, }, + { + command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${STATEMENT} ${TARGET}`, + description: `Selects from the ${TARGET_DESC} through the end of its containing statement.`, + }, ], }, leading: { @@ -414,7 +487,7 @@ export const modifierReferences: Record< { command: `${SET_SELECTION} ${VAR_SPOKEN_FORM}`, description: - "Selects only to the nonempty selections when there are multiple selections.", + "Selects only the nonempty selections when there are multiple selections.", }, ], }, @@ -492,4 +565,7 @@ export const modifierReferences: Record< syntaxes: [], examples: [], }, -}; +} as const satisfies Record< + ModifierType | AdditionalModifierReferenceType, + ReferenceEntry +>; diff --git a/packages/lib-common/src/references/scopeReferences.ts b/packages/lib-common/src/references/scopeReferences.ts index b25429c084..8db034e79e 100644 --- a/packages/lib-common/src/references/scopeReferences.ts +++ b/packages/lib-common/src/references/scopeReferences.ts @@ -5,6 +5,8 @@ import { LINE, SET_SELECTION, STATEMENT, + TARGET, + TARGET_DESC, VAR_CHARACTER, VAR_PAIR, VAR_SPOKEN_FORM, @@ -17,12 +19,11 @@ import { graphemeDefaultSpokenForms } from "./spokenForms/graphemeDefaultSpokenF const DEFAULT_PATTERN = VAR_SPOKEN_FORM; 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; +const FIRST = connectiveDefaultSpokenForms.first; -export const scopeReferences: Record = { +export const scopeReferences = { argumentOrParameter: { name: "Argument or parameter", defaultSpokenForm: "arg", @@ -596,14 +597,14 @@ export const scopeReferences: Record = { syntaxes: [ { pattern: DEFAULT_PATTERN, - description: "XML both tags.", - cheatsheet: "XML both tags", + description: "XML start and end tags.", + cheatsheet: "XML start and end tags", }, ], examples: [ { command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, - description: `Selects the xml both tags containing the ${TARGET_DESC}.`, + description: `Selects both tags of the XML element containing the ${TARGET_DESC}.`, }, ], }, @@ -620,7 +621,7 @@ export const scopeReferences: Record = { examples: [ { command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, - description: `Selects the xml element containing the ${TARGET_DESC}.`, + description: `Selects the XML element containing the ${TARGET_DESC}.`, }, ], }, @@ -637,7 +638,7 @@ export const scopeReferences: Record = { examples: [ { command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, - description: `Selects the xml end tag containing the ${TARGET_DESC}.`, + description: `Selects the XML end tag containing the ${TARGET_DESC}.`, }, ], }, @@ -654,7 +655,7 @@ export const scopeReferences: Record = { examples: [ { command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, - description: `Selects the xml start tag containing the ${TARGET_DESC}.`, + description: `Selects the XML start tag containing the ${TARGET_DESC}.`, }, ], }, @@ -789,8 +790,8 @@ export const scopeReferences: Record = { ], examples: [ { - command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, - description: `Selects the character containing the ${TARGET_DESC}.`, + command: `${SET_SELECTION} ${FIRST} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the first character in the ${TARGET_DESC}.`, }, ], }, @@ -807,8 +808,8 @@ export const scopeReferences: Record = { ], examples: [ { - command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, - description: `Selects the sub token word containing the ${TARGET_DESC}.`, + command: `${SET_SELECTION} ${FIRST} ${VAR_SPOKEN_FORM} ${TARGET}`, + description: `Selects the first sub token word in the ${TARGET_DESC}.`, }, ], }, @@ -825,7 +826,7 @@ export const scopeReferences: Record = { examples: [ { command: `${SET_SELECTION} ${VAR_SPOKEN_FORM} ${TARGET}`, - description: `Selects the token containing the ${TARGET_DESC}.`, + description: `Selects the ${TARGET_DESC}.`, }, ], }, @@ -1192,4 +1193,4 @@ export const scopeReferences: Record = { syntaxes: [], examples: [], }, -}; +} as const satisfies Record; diff --git a/packages/tool-meta-updater/src/updateReferenceMdx.ts b/packages/tool-meta-updater/src/updateReferenceMdx.ts index d8d08a992b..e25f40d4d4 100644 --- a/packages/tool-meta-updater/src/updateReferenceMdx.ts +++ b/packages/tool-meta-updater/src/updateReferenceMdx.ts @@ -14,6 +14,12 @@ export function updateReferenceMdx( return null; } + if (entry.examples.length < entry.syntaxes.length) { + throw new Error( + `Reference "${id}" has ${entry.syntaxes.length} syntaxes, but only ${entry.examples.length} examples`, + ); + } + const isScope = kind === "scope"; const expected: string[] = []; @@ -71,17 +77,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(``, "");