Skip to content

Commit 91713d8

Browse files
Move the modifiers docs from README.md into separate reference markdown files (#3315)
1 parent 16f42aa commit 91713d8

28 files changed

Lines changed: 188 additions & 344 deletions

‎packages/app-web-docs/src/docs/user/README.md‎

Lines changed: 2 additions & 337 deletions
Large diffs are not rendered by default.

‎packages/app-web-docs/src/docs/user/actions/setInstanceReference.mdx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ sidebar_label: From
44

55
# From (Set instance reference)
66

7-
Sets the instance reference for the next 'instance of' action.
7+
Sets the instance reference. This restricts the next instance search to a target. With `"every instance"`, the target defines the region to search; with `"next instance"`, it defines the position where the search begins.
8+
9+
Older Cursorless installations may have `"from"` disabled. Remove the leading `-` from its entry in `experimental/experimental_actions.csv` to enable it; see the [settings CSV documentation](../customization.md).
810

911
Cursorless ID: `experimental.setInstanceReference`
1012

@@ -19,3 +21,4 @@ Default: `from`
1921
## Examples
2022

2123
- `"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.
24+
- `"from blue air take next instance green bat"` - Selects the next instance of the token containing letter 'b' with a green hat, searching from the token containing letter 'a' with a blue hat.

‎packages/app-web-docs/src/docs/user/modifiers/ancestor.mdx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar_label: Grand
44

55
# Grand (Ancestor)
66

7+
Selects the parent of a containing scope. Repeat `"grand"` to walk up more than one parent level.
8+
79
Cursorless ID: `ancestor`
810

911
## Spoken form
@@ -17,3 +19,4 @@ Default: `grand`
1719
## Examples
1820

1921
- `"take grand state blue air"` - Selects the parent statement of the statement containing the token containing letter 'a' with a blue hat.
22+
- `"take grand grand state blue air"` - Selects the grandparent statement of the statement containing the token containing letter 'a' with a blue hat.

‎packages/app-web-docs/src/docs/user/modifiers/containingScope.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Containing scope
22

3+
Expands a target to the containing instance of a scope. When the input is `"this"` with multiple selections, Cursorless expands each selection independently.
4+
35
Cursorless ID: `containingScope`
46

57
## Syntax

‎packages/app-web-docs/src/docs/user/modifiers/everyScope.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar_label: Every
44

55
# Every (Every scope)
66

7+
Selects all matching sibling scopes. It can also prefix an ordinal or relative modifier to return separate targets instead of one contiguous range.
8+
79
Cursorless ID: `everyScope`
810

911
## Spoken form

‎packages/app-web-docs/src/docs/user/modifiers/extendThroughEndOf.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar_label: Tail
44

55
# Tail (Extend through end of)
66

7+
Extends a target through the end of its line. Inside a surrounding pair, it stops at the end of the pair's interior; use an explicit scope such as `"tail line"` to override that boundary.
8+
79
Cursorless ID: `extendThroughEndOf`
810

911
## Spoken form

‎packages/app-web-docs/src/docs/user/modifiers/extendThroughStartOf.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar_label: Head
44

55
# Head (Extend through start of)
66

7+
Extends a target through the start of its line. Inside a surrounding pair, it stops at the start of the pair's interior; use an explicit scope such as `"head line"` to override that boundary.
8+
79
Cursorless ID: `extendThroughStartOf`
810

911
## Spoken form

‎packages/app-web-docs/src/docs/user/modifiers/inferPreviousMark.mdx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar_label: Its
44

55
# Its (Infer previous mark)
66

7+
Within a compound target, applies the following modifier to the previously mentioned mark. Without `"its"`, an implicit target such as `"line"` is resolved relative to the current selection instead.
8+
79
Cursorless ID: `inferPreviousMark`
810

911
## Spoken form
@@ -17,3 +19,4 @@ Default: `its`
1719
## Examples
1820

1921
- `"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.
22+
- `"bring blue air to its value"` - Replaces the value containing the token containing letter 'a' with a blue hat with that token.

‎packages/app-web-docs/src/docs/user/modifiers/ordinalScope.mdx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Ordinal scope
22

3+
The iteration scope depends on the scope type. For example, functions iterate within a class, tokens within a line, and characters within a token.
4+
5+
Without `"every"`, plural ordinal forms produce one contiguous range. Prefix them with `"every"` to produce separate targets instead.
6+
7+
<div className="dark-mode-invert">
8+
9+
![Relative and ordinal modifier diagram](../images/relative_ordinal.png)
10+
11+
</div>
12+
313
Cursorless ID: `ordinalScope`
414

515
## Syntax

‎packages/app-web-docs/src/docs/user/modifiers/relativeScope.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Relative scope
22

3+
The iteration scope depends on the scope type. For example, functions iterate within a class, tokens within a line, and characters within a token.
4+
5+
Relative modifiers select scopes before or after the input target. Without `"every"`, plural forms produce one contiguous range; prefix them with `"every"` to produce separate targets instead.
6+
37
Cursorless ID: `relativeScope`
48

59
## Syntax

0 commit comments

Comments
 (0)