Skip to content

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Jan 4, 2025

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

@AndreasArvidsson AndreasArvidsson requested a review from a team as a code owner January 4, 2025 03:47
@AndreasArvidsson AndreasArvidsson changed the title Added append action Add action Jan 4, 2025
@AndreasArvidsson AndreasArvidsson changed the title Add action Add selection action Jan 4, 2025
@pokey pokey added the to discuss Plan to discuss at meet-up label Jan 7, 2025
@pokey
Copy link
Member

pokey commented Jan 7, 2025

couldn't we solve this using #2157?

@phillco
Copy link
Member

phillco commented Jan 9, 2025

Sounds like #2157 was discussed but this was considered to be a more elegant syntax (I agree)

@phillco
Copy link
Member

phillco commented Jan 9, 2025

Going to merge, @pokey let us know if you have followup comments

@phillco phillco enabled auto-merge January 9, 2025 18:06
@phillco phillco changed the title Add selection action Add action to select new targets Jan 9, 2025
@phillco phillco added this pull request to the merge queue Jan 9, 2025
Merged via the queue into main with commit 43e9e21 Jan 9, 2025
15 checks passed
@phillco phillco deleted the appendAction branch January 9, 2025 19:17
cursorless-bot pushed a commit that referenced this pull request Jan 9, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

to discuss Plan to discuss at meet-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants