Skip to content

Commit 7a1eac9

Browse files
jmegnerJacob Egner
and
Jacob Egner
authored
doc "drink" and "pour" can do more than lines (#1772)
fix #1766 --------- Co-authored-by: Jacob Egner <[email protected]>
1 parent f17bdf2 commit 7a1eac9

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

cursorless-talon/src/cheatsheet/sections/actions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def get_actions():
3535
simple_actions,
3636
{
3737
"callAsFunction": "Call <target> on selection",
38+
"editNewLineAfter": "Edit new line/scope after",
39+
"editNewLineBefore": "Edit new line/scope before",
3840
},
3941
),
4042
{

docs/user/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,13 @@ For example:
579579
- `"drink <TARGET>"`: Inserts a new line above the target line, and moves the cursor to the newly created line
580580
- `"pour <TARGET>"`: Inserts a new line below the target line, and moves the cursor to the newly created line
581581
582-
eg:
583-
`pour blue air`
584-
Insert empty line below the token containing letter 'a' with a blue hat.
582+
eg: `pour blue air` will insert empty line below the token containing letter 'a' with a blue hat and moves the cursor to the new line.
583+
584+
Note: `"drink"` and `"pour"` are actually a bit more versatile than just lines.
585+
If you use a [syntactic scope](#syntactic-scopes) modifier on the target, then`"drink"` and `"pour"` will do the
586+
appropriate insertions to prepare the text for a new instance of that scope.
587+
588+
eg: `pour item air` will insert a comma and space after the air item, and place the cursor after the inserted characters.
585589
586590
### Homophones
587591

packages/cheatsheet/src/lib/sampleSpokenFormInfos/defaults.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"variations": [
7171
{
7272
"spokenForm": "pour <target>",
73-
"description": "Edit new line after"
73+
"description": "Edit new line/scope after"
7474
}
7575
]
7676
},
@@ -80,7 +80,7 @@
8080
"variations": [
8181
{
8282
"spokenForm": "drink <target>",
83-
"description": "Edit new line before"
83+
"description": "Edit new line/scope before"
8484
}
8585
]
8686
},

0 commit comments

Comments
 (0)