Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(punctuator): convert digit separators #973

Merged
merged 1 commit into from
Jan 19, 2025
Merged

Conversation

lotem
Copy link
Member

@lotem lotem commented Jan 16, 2025

use ascii punctuation ,.:' after numbers.
they are auto-committed if followed by digit.
or commit manualy with space key.
double strike the key to access the original binding.

@lotem lotem requested a review from a team January 16, 2025 02:49
@lotem lotem force-pushed the master branch 3 times, most recently from 7363592 to e02d6b3 Compare January 16, 2025 03:04
@lotem lotem changed the title feat(punctuator): recognize number patterns feat(punctuator): auto-convert digit separator Jan 16, 2025
Copy link
Contributor

@fxliang fxliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lotem
Copy link
Member Author

lotem commented Jan 16, 2025

等等。晚些再尝试能否真正做到半选。根据全半角状态填一个候选项进去。
还有用家要开关。也加上吧。

@lotem lotem force-pushed the master branch 4 times, most recently from 1898701 to e5c2feb Compare January 17, 2025 14:57
@lotem lotem changed the title feat(punctuator): auto-convert digit separator feat(punctuator): convert punctuation in numbers Jan 17, 2025
fixes rime#972

use ascii punctuation ,.:' after numbers.
they are auto-committed if followed by a digit.
or commit manualy with space key.
double strike the key to access the original binding.

support half-shape and full-shape forms.

customize string `punctuator/digit_separators` to specify which ascii
characters are digit separators.
@lotem lotem changed the title feat(punctuator): convert punctuation in numbers feat(punctuator): convert digit separators Jan 19, 2025
@lotem lotem merged commit 28a234f into rime:master Jan 19, 2025
10 checks passed
@JovianChau
Copy link

这个双击输入原值还可以进一步判定吗?
因为在输入数字的时候,有时候会多打,然后需要按下「退格」;
那么就会出现无法输入「.」的情况。

是否可以实现:
在单击是「.」时双击输入「。」
在单击是「。」时双击输入是「.」

@lotem
Copy link
Member Author

lotem commented Jan 23, 2025

……按下「退格」; 那么就会出现无法输入「.」的情况。

需要您進一步說明如何無法輸入。
如果說,數字後誤操作雙擊上屏了「。」,想再打回「.」,那確實沒辦法。

是否可以实现: 在单击是「.」时双击输入「。」 在单击是「。」时双击输入是「.」

目前的實現就是數字之後單擊 . 出「.」,雙擊出「。」

如果想要任意情況下都可以隨時切換兩種符號,那還得將符號的定義設爲列表,把兩個符號都放進去。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants