Skip to content

Instantly share code, notes, and snippets.

@sci-42ver
sci-42ver / README.md
Last active April 9, 2024 04:24
Rime里 保持更新用户词典的同时 自动添加空格

在Rime里使用Lua实现保持更新用户词典的同时自动添加空格 | Lua implemention of adding spaces among punctuation, English words and Chinese words in Rime while keeping spaces

Kw to help searching in Github Gist: Rime rime 空格 更新 词典 用户词典 更新用户词典

This is based on rime-ice merge from rime-fast-xhup. But it seems to not update user_dict due to too early manipulating keys before the translator. Since I only want to add the space and the segmentor can't give one candidate, so I tried implementing it in the filter (not one whole new word). Then I followed this issue comment. The following is one combination of the above 2 links with some small addition.

Since there is probably no need for updating the userdict in rime-fast-xhup because the big dicts. I didn't add one PR. Anyone want the feature of updating the userdict can search manually and get here.

Hope this can help you.

@sci-42ver
sci-42ver / AutoPair.ahk
Last active October 29, 2024 02:32
Weasel 自动发送成对符号并居中光标 | Autopair symbols and move the cursor to the middle in Windows Rime / Weasel
#Requires AutoHotkey v2.0
#SingleInstance Force ; https://stackoverflow.com/a/51973659/21294350 https://superuser.com/a/371141/1658455
; InstallKeybdHook ; https://stackoverflow.com/questions/18693881/detect-what-button-is-pressed#comment118671604_57718403
^!r::Reload ; Ctrl+Alt+R
MsgBox "reload"
^!a::Run "D:\AutoHotkey\UX\AutoHotkeyUX.exe `"D:\AutoHotkey\UX\ui-dash.ahk`"" ; Ctrl+Alt+R
; https://www.autohotkey.com/boards/viewtopic.php?p=345923#p345923