Skip to content

Commit

Permalink
The change spoken form of word scope to sub (#2089)
Browse files Browse the repository at this point in the history
Fixes #1918

## 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]>
  • Loading branch information
AndreasArvidsson and pokey authored Dec 5, 2023
1 parent 698559e commit 197bb16
Show file tree
Hide file tree
Showing 74 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion cursorless-talon/src/spoken_forms.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"environment": "environment",
"command": "command",
"char": "character",
"word": "word",
"sub": "word",
"token": "token",
"identifier": "identifier",
"line": "line",
Expand Down
12 changes: 6 additions & 6 deletions docs/user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,17 @@ For example, the command `take every key [blue] air` will select every key in th

##### Sub-token modifiers

###### `"word"`
###### `"sub"`

If you need to refer to the individual words within a `camelCase`/`snake_case` token, you can use the `"word"` modifier. For example,
If you need to refer to the individual words within a `camelCase`/`snake_case` token, you can use the `"sub"` modifier. For example,

- `"second word air"`
- `"second past fourth word air"`
- `"last word air"`
- `"second sub air"`
- `"second past fourth sub air"`
- `"last sub air"`

For example, the following command:

"take second past fourth word blue air"
"take second past fourth sub blue air"

Selects the second, third and fourth word in the token containing letter 'a' with a blue hat.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const defaultSpokenFormMapCore: DefaultSpokenFormMapDefinition = {
command: "command",
// Text-based scope types
character: "char",
word: "word",
word: "sub",
token: "token",
identifier: "identifier",
line: "line",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: chuck second word that
spokenForm: chuck second sub that
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change first char second word harp
spokenForm: change first char second sub harp
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change first word past trap
spokenForm: change first sub past trap
version: 2
targets:
- type: range
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change first word that
spokenForm: change first sub that
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change leading second word
spokenForm: change leading second sub
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change second word
spokenForm: change second sub
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change second word
spokenForm: change second sub
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change second word air
spokenForm: change second sub air
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
languageId: typescript
command:
version: 1
spokenForm: take first word
spokenForm: take first sub
action: setSelection
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: change first word look
spokenForm: change first sub look
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: change last word look
spokenForm: change last sub look
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: change leading last word look
spokenForm: change leading last sub look
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: change second word look
spokenForm: change second sub look
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: change trailing first word look
spokenForm: change trailing first sub look
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: chuck first word cap
spokenForm: chuck first sub cap
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: chuck last word cap
spokenForm: chuck last sub cap
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: move first word zip before fine take fine
spokenForm: move first sub zip before fine take fine
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: move first word zip before fine take zip
spokenForm: move first sub zip before fine take zip
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: move last word zip after fine take fine
spokenForm: move last sub zip after fine take fine
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: scss
command:
spokenForm: move last word zip after fine take zip
spokenForm: move last sub zip after fine take zip
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: shellscript
command:
spokenForm: change third word dash
spokenForm: change third sub dash
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: shellscript
command:
spokenForm: chuck first word bat
spokenForm: chuck first sub bat
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: shellscript
command:
spokenForm: chuck second word cap
spokenForm: chuck second sub cap
version: 2
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
languageId: plaintext
command:
version: 5
spokenForm: change two instances last word air
spokenForm: change two instances last sub air
action: {name: clearAndSetSelection}
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: chuck word
spokenForm: chuck sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: chuck word
spokenForm: chuck sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change next word
spokenForm: change next sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change next word
spokenForm: change next sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change next word
spokenForm: change next sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change previous word
spokenForm: change previous sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change previous word
spokenForm: change previous sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change previous word
spokenForm: change previous sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change second last word
spokenForm: change second last sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change second next word
spokenForm: change second next sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: change word
spokenForm: change sub
version: 3
targets:
- type: primitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
languageId: plaintext
command:
spokenForm: take every word
spokenForm: take every sub
version: 3
targets:
- type: primitive
Expand Down
Loading

0 comments on commit 197bb16

Please sign in to comment.