Skip to content

Get "change" / "replace" action working again #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pokey opened this issue Aug 13, 2021 · 2 comments
Closed

Get "change" / "replace" action working again #58

pokey opened this issue Aug 13, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@pokey
Copy link
Member

pokey commented Aug 13, 2021

We disabled the "replace" command because we couldn't figure out a good way to make it work with DFA times. The "replace T with X" form of the command adds about 30-50ms. However, using the "change T word X" form causes DFA compilation times to increase by over 200ms. We will also probably want to add "insert" at the same time.

We can then add "add" with same syntax "add T word X", but by default will modify T to have an "after". In the future, it will be its own action (see cursorless-dev/cursorless#210)

@pokey pokey added the enhancement New feature or request label Aug 13, 2021
@AndreasArvidsson AndreasArvidsson self-assigned this Aug 14, 2021
@AndreasArvidsson AndreasArvidsson linked a pull request Aug 16, 2021 that will close this issue
@AndreasArvidsson AndreasArvidsson removed their assignment Nov 27, 2021
@AndreasArvidsson
Copy link
Member

@pokey Can we close this one?

@pokey
Copy link
Member Author

pokey commented Dec 11, 2021

Yes. As discussed, there are many ways one might insert text, and users will often have their own custom ways of doing so. Thus, we prefer to let users use "clear" (which we've now renamed by default to "change"), followed by their own text commands. In the future we'll add a robust "cursor back" command to make it easy to move somewhere, insert text, then return. So this issue's "change air word hello" will just become "change air word hello back", but in exchange for the extra syllable, the user will be able to replace "word hello" with any text editing commands that their user scripts support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants