-
Notifications
You must be signed in to change notification settings - Fork 572
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
希望中文模式下,紧跟数字的逗号也自动转换成半角 #712
Comments
already implemented in #672 |
先用 librime-lua 止渴 -- digital.lua # 存入 user_dir/lua
-- lua_processor@*digital # 插入 engine/processors/ascii_compose 後
--
local P={}
function P.init(env)
end
function P.fini(env)
end
function P.func(key,env)
local context = env.engine.context
if context:is_composing() then return 2 end
if key:ctrl() or key:alt() or key:super() then return 2 end
if key.keycode < 0x7f then
local ascii_str= string.char(key.keycode)
local last_ch= context.commit_history:back()
if last_ch and last_ch.text:match("%d$") and ascii_str:match("[.,]") then
return 0
end
end
return 2
end
return P |
是不是還有後續,有高手做成能在方案裏配置的? |
放在那 ascii_composer? |
#672是硬编码,且只能随后输入的字符变成半角,不能识别输入符前面的文字,不能识别方向键等已移动位置。 应该非硬编码且可配置的。 |
可以模式匹配。 默認配置已經支持識別網址。 |
谢谢。https://github.com/Mintimate/oh-my-rime/blob/main/double_pinyin_flypy.schema.yaml 覆盖了
|
目前紧跟数字的句号和冒号会自动变半角,我希望逗号也能这样
因为很多时候输入长数字,需要输入千位、万位分隔符
比如1,000,000或者10,0000,0000.00
还有些地区的分隔符和小数点是相反的,即小数点是逗号,分隔符是句点
如果数字后的逗号也能自动变半角就会方便很多,现在每次输入长数字还要切换英文模式,有点麻烦。
谢谢!
The text was updated successfully, but these errors were encountered: