Created
July 9, 2012 12:23
-
-
Save lotem/3076166 to your computer and use it in GitHub Desktop.
自動識別西文及數字組成的用戶名
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
# default.custom.yaml | |
# 全局範圍識別輸入串爲 rime + 任意數字序列,以及形如 rimeime-1.2.3 的常用西文短語 | |
# 也可將本組 patch 寫入 <輸入方案ID>.custom.yaml 使這組規則僅在一款輸入方案中有效 | |
# | |
# 第一例,輸入 rime 之後,再輸入任意一個數字,則立即識別爲西文輸入 | |
# 再加上 default.yaml 原有的 email 規則,識別包含 @ 字符的郵箱,於是可以一氣呵成 rime123@company.com | |
# 第二例,輸入到 rimeime 時,立即識別爲西文輸入,並可跟隨任意位數字及指定的符號 | |
patch: | |
recognizer/patterns/rime123: "^rime[0-9]+$" | |
recognizer/patterns/rimeime: "^rimeime[-_.0-9]*$" |
作者大大,麻烦整理一下最终版?从最开始的评论依次跟着评论调整下来,效果还是差强人意。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
大佬,正常输入的时候回车就上屏第一个候选了,能不能正常输入中文时,按回车时上屏的刚才输入的编码。同时实现分号的临时英文,回车时英文。如果这个
Return: commit_composition
注释后,正常输入中文时回车为编码上屏,临时英文时,英文的前面会有一个分号。