Skip to content

Instantly share code, notes, and snippets.

@zfz
Last active November 27, 2018 23:46
Show Gist options
  • Save zfz/7314929 to your computer and use it in GitHub Desktop.
Save zfz/7314929 to your computer and use it in GitHub Desktop.
参考 https://www.dreamxu.com/install-config-squirrel/
用户词库的导入导出
目前鼠须管没有图形工具,使用命令行工具也是一样的
先做一些准备工作
新建文件 touch ~/Library/Rime/rime_dict_manager, 输入如下内容
#!/bin/bash
#
# put this script in ~/Library/Rime, list existing user dictionaries:
# ./rime_dict_manager --list
# see other supported options:
# ./rime_dict_manager
DYLD_LIBRARY_PATH="/Library/Input Methods/Squirrel.app/Contents/Frameworks" "/Library/Input Methods/Squirrel.app/Contents/MacOS/rime_dict_manager" $@
然后添加可执行权限
chmod +x ~/Library/Rime/rime_dict_manager
进入用户资料夹 (~/Library/Rime/), 执行相关操作
导入导出
查看用户词典列表
./rime_dict_manager -l
先关闭输入法,释放以独占方式打开的词典文件
killall Squirrel
将词库导入
./rime_dict_manager -i dict_name import.txt
将词库导出
./rime_dict_manager -e dict_name export.txt
# 中西文切換鍵的默認設置寫在 default.yaml 裏面
# 以下的 default.custom.yaml 在全局範圍重定義該組快速鍵
#
# 可用的按鍵有 Caps_Lock, Shift_L, Shift_R, Control_L, control_R
# Mac 系統上的鼠鬚管不能區分左、右,因此只有對 Shift_L, Control_L 的設定起作用
#
# 已輸入編碼時按切換鍵,可以進一步設定輸入法中西文切換的形式。
# 可選的臨時切換策略有三:
# inline_ascii 在輸入法的臨時西文編輯區內輸入字母、數字、符號、空格等,回車上屏後自動復位到中文
# commit_text 已輸入的候選文字上屏並切換至西文輸入模式
# commit_code 已輸入的編碼字符上屏並切換至西文輸入模式
# 設爲 noop,屏蔽該切換鍵
#
# 如果要把 Caps Lock 設爲只改變字母的大小寫而不做中西文切換,可將 Caps_Lock 對應的切換方式設爲 noop
# 如果要以 Caps Lock 切換到西文模式,默認輸出小寫字母,請置 ascii_composer/good_old_caps_lock: false
# 如果要以 Caps Lock 切換到西文模式,默認輸出大寫字母,請使用以下設置:
patch:
"menu/page_size": 9
ascii_composer:
good_old_caps_lock: true
switch_key:
Caps_Lock: commit_code
Control_L: noop
Control_R: noop
Shift_L: commit_code
Shift_R: inline_ascii
#!/bin/bash
#
# put this script in ~/Library/Rime, list existing user dictionaries:
# ./rime_dict_manager --list
# see other supported options:
# ./rime_dict_manager
DYLD_LIBRARY_PATH="/Library/Input Methods/Squirrel.app/Contents/Frameworks" "/Library/Input Methods/Squirrel.app/Contents/MacOS/rime_dict_manager" $@
patch:
"style/color_scheme": luna
"style/font_point": 18
"style/font_face": "helvetica"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment