-
Notifications
You must be signed in to change notification settings - Fork 784
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
Delimiter pairs #1612
base: main
Are you sure you want to change the base?
Delimiter pairs #1612
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the additional ways to insert delimiters into a separate file, remove those that have spoken forms equivalent to the once being introduced and deprecate all the rest.
Co-authored-by: Phil Cohen <[email protected]>
for more information, see https://pre-commit.ci
Changes performed. Also migrated deprecated symbol commands to a separate file and called the deprecated command action. |
core/edit/edit.talon
Outdated
<user.delimiter_pair>: user.delimiter_pair_insert(delimiter_pair) | ||
|
||
# Wrap selection with delimiter pairs | ||
<user.delimiter_pair> that: user.delimiter_pair_wrap_selection(delimiter_pair) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one subtlety with the new wrap command versus the deprecated commands:
the cursor winds up within the delimiters when wrapping; previously, the cursor would wind up outside. I'm not entirely sure this change is undesirable. If the intent is to replace the deprecated commands, should we preserve the previous functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose there are three scenarios we could cover with the grammar.
- cursor between the delimiters. Done.
- Wrapping selection with delimiters. Done, but need to settle the cursor position.
- Patch in the delimiters, cursor after. I believe this was the original purpose of the "empty " commands, but they no longer behave as such. Should we bother with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I prefer the cursor ending up inside but we can change it if people prefer. Should we get a few additional voices on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Jeff Knaus <[email protected]>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
These are the spoken forms I personal use (except for padding). Do we want to use something else?
What do we do with all the existing symbol commands?
https://github.com/talonhub/community/blob/bb240ba1cf958bd3e2c7791e5a57d09d205adc81/plugin/symbols/symbols.talon#L10-L45
Fixes #546