-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action to select new targets (#2707)
Adds a new selection while preserving existing ones `"append <target>"` replaces `"take this and <target>"` You can also use `append pre` and `append post` to add a cursor before or after the given target (rather than selecting that target), while keeping your current selections unchanged. (Previously you could do something like `pre this and <target>` but this would also reduce your current selection to a cursor before the current target.) ## Checklist - [x] 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: Phil Cohen <[email protected]>
- Loading branch information
1 parent
c69a57a
commit 43e9e21
Showing
10 changed files
with
184 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
languageId: plaintext | ||
command: | ||
version: 7 | ||
spokenForm: append post whale | ||
action: | ||
name: addSelectionAfter | ||
target: | ||
type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: w} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: hello world | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: | ||
default.w: | ||
start: {line: 0, character: 6} | ||
end: {line: 0, character: 11} | ||
finalState: | ||
documentContents: hello world | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
- anchor: {line: 0, character: 11} | ||
active: {line: 0, character: 11} | ||
thatMark: | ||
- type: UntypedTarget | ||
contentRange: | ||
start: {line: 0, character: 6} | ||
end: {line: 0, character: 11} | ||
isReversed: false | ||
hasExplicitRange: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
languageId: plaintext | ||
command: | ||
version: 7 | ||
spokenForm: append pre whale | ||
action: | ||
name: addSelectionBefore | ||
target: | ||
type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: w} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: hello world | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: | ||
default.w: | ||
start: {line: 0, character: 6} | ||
end: {line: 0, character: 11} | ||
finalState: | ||
documentContents: hello world | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
- anchor: {line: 0, character: 6} | ||
active: {line: 0, character: 6} | ||
thatMark: | ||
- type: UntypedTarget | ||
contentRange: | ||
start: {line: 0, character: 6} | ||
end: {line: 0, character: 11} | ||
isReversed: false | ||
hasExplicitRange: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
languageId: plaintext | ||
command: | ||
version: 7 | ||
spokenForm: append whale | ||
action: | ||
name: addSelection | ||
target: | ||
type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: w} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: hello world | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: | ||
default.w: | ||
start: {line: 0, character: 6} | ||
end: {line: 0, character: 11} | ||
finalState: | ||
documentContents: hello world | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
- anchor: {line: 0, character: 6} | ||
active: {line: 0, character: 11} | ||
thatMark: | ||
- type: UntypedTarget | ||
contentRange: | ||
start: {line: 0, character: 6} | ||
end: {line: 0, character: 11} | ||
isReversed: false | ||
hasExplicitRange: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters