Skip to content

Commit effff0d

Browse files
Update head/tail docs with regards to surrounding pairs (#2676)
## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [x] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [x] I have not broken the cheatsheet --------- Co-authored-by: Pokey Rule <[email protected]>
1 parent 762f377 commit effff0d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_modifiers():
6464
"variations": [
6565
{
6666
"spokenForm": complex_modifiers["extendThroughStartOf"],
67-
"description": "Extend through start of line",
67+
"description": "Extend through start of line/pair",
6868
},
6969
{
7070
"spokenForm": f"{complex_modifiers['extendThroughStartOf']} <modifier>",
@@ -78,7 +78,7 @@ def get_modifiers():
7878
"variations": [
7979
{
8080
"spokenForm": complex_modifiers["extendThroughEndOf"],
81-
"description": "Extend through end of line",
81+
"description": "Extend through end of line/pair",
8282
},
8383
{
8484
"spokenForm": f"{complex_modifiers['extendThroughEndOf']} <modifier>",

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@
796796
"variations": [
797797
{
798798
"spokenForm": "tail",
799-
"description": "Extend through end of line"
799+
"description": "Extend through end of line/pair"
800800
},
801801
{
802802
"spokenForm": "tail <modifier>",
@@ -810,7 +810,7 @@
810810
"variations": [
811811
{
812812
"spokenForm": "head",
813-
"description": "Extend through start of line"
813+
"description": "Extend through start of line/pair"
814814
},
815815
{
816816
"spokenForm": "head <modifier>",

packages/cursorless-org-docs/src/docs/user/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ The modifiers `"head"` and `"tail"` can be used to expand a target through the b
310310
- `"take head air"`: selects the mark through to start of the line
311311
- `"take tail air"`: selects the mark through to the end of the line
312312

313+
When inside a single-line surrounding pair (eg parentheses, brackets, etc) the head/tail modifier will only expand to the interior of that pair instead of the whole line. You can explicitly say `"head line"` or `"tail line"` to get the line behavior.
314+
313315
When followed by a modifier, they will expand their input to the start or end of the given modifier range. For example:
314316

315317
- `"take head funk"`: select from the cursor the start of the containing function

0 commit comments

Comments
 (0)