输入法

  • Rime (中州韵输入法引擎):开源、快速、跨平台的输入法框架。其在不同平台有不同的名称:
    • macOS: Squirrel (鼠须管)
    • Windows: Weasel (小狼毫)
    • Linux: IBus-Rime 或 Fcitx5-Rime
    • Android/iOS: 同文 (Trime) / 仓鼠 (Hamster)
  • 雾凇拼音 (Rime-ice):Rime 社区目前最火、口碑最好的词库与配置方案。它不仅提供了高质量的词库,还优化了默认配置,解决了 Rime 原生“难配置”的痛点,且全平台通用。

安装与配置步骤

  1. 安装 Squirrel (鼠须管)

    • 从 Rime 官网下载并安装 Squirrel
    • 在系统设置 → 键盘中配置好输入法
  2. 清理 Rime 配置目录

    • 删除 ~/Library/Rime/ 下的所有文件(包括隐藏文件)
  3. 安装雾凇拼音

    1
    2
    3
    4
    5
    
    # 进入 Rime 配置目录
    cd ~/Library/Rime/
    
    # 克隆雾凇拼音配置(使用 --depth 1 加快克隆速度)
    git clone https://github.com/iDvel/rime-ice.git . --depth 1
    
  4. 后续更新

    1
    2
    
    cd ~/Library/Rime/
    git pull
    

    git pull 只更新雾凇仓库里的文件,不会覆盖你新增的 *.custom.yamlmy_phrase.txt 等。

  5. 修改配置

配置文件在 ~/Library/Rime/。不要直接改雾凇自带的 squirrel.yamlrime_ice.schema.yaml 等,新增个人文件即可:

文件作用
rime_ice.custom.yaml方案:默认中英、emoji、自定义短语
squirrel.custom.yaml鼠须管:横排、按应用默认中英
my_phrase.txt邮箱、电话等固定短语

写法用 patch: 打补丁,可参考仓库里同名文件的注释。改完后:鼠须管菜单 → 重新部署

rime_ice.custom.yaml

路径:~/Library/Rime/rime_ice.custom.yaml

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
patch:
  # 全局:新开输入时默认英文(A);0=中文,1=英文
  switches:
    - name: ascii_mode
      states: [中, A]
      reset: 1

  switches/@3/reset: 0       # 默认关闭 emoji
  "menu/page_size": 8        # 候选词数量

  custom_phrase/user_dict: my_phrase   # 自定义短语,见 my_phrase.txt

squirrel.custom.yaml

路径:~/Library/Rime/squirrel.custom.yaml

配合上文全局默认英文:终端、IDE 等无需单独配置;下列 App 聚焦时默认中文。未安装的可删掉对应行。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
patch:
  style/candidate_list_layout: linear   # 候选横排

  app_options:
    com.apple.Safari:
      ascii_mode: false
    com.google.Chrome:
      ascii_mode: false
    com.tencent.xinWeChat:
      ascii_mode: false

    # 按需追加,聚焦时默认中文:
    # org.mozilla.firefox:
    #   ascii_mode: false
    # company.thebrowser.Browser:          # Arc
    #   ascii_mode: false

查询本机应用的 Bundle ID

1
2
3
osascript -e 'id of app "Safari"'
osascript -e 'id of app "Google Chrome"'
osascript -e 'id of app "WeChat"'

my_phrase.txt

路径:~/Library/Rime/my_phrase.txt

  • 三列之间用 Tab 分隔,不能用空格。
  • #@/db_name 必须与文件名一致。
  • 编码在 中文(中) 模式下输入;全局默认英文时,英文模式下只会当字母上屏。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Rime table
# coding: utf-8
#@/db_name my_phrase.txt
#@/db_type tabledb
#
# 格式:词汇<Tab>编码<Tab>权重

qq.com	yxqq	100
gmail.com	yxg	100
352733536	qno	100
18850541002	pno	100

# 整条邮箱示例(改成自己的):
# you@gmail.com	yxmail	100

使用技巧

方案与切换

操作快捷键
方案选单(中英、emoji、简繁等)F4 或 `Ctrl+``
翻页- / =
简繁切换Ctrl+Shift+4
  • Shift:上屏当前编码并切英文(雾凇默认)
  • 改配置后:鼠须管菜单 → 重新部署

候选与编辑

操作快捷键
以词定字(取首/尾字,比如打一个词语闽菜,取首字为闽)[ / ]
拼音内移动光标Tab / Shift+Tab
按音节跳拼音Alt(Option)+← / Alt(Option)+→

雾凇内置小功能

输入效果
rq / sj / xq日期 / 时间 / 星期
dt / tsISO 时间 / 时间戳
nl当前农历
N20260210指定公历转农历
cC1+2*3计算器
R1234.56数字金额大写
U62fcUnicode 字符(拼)
uuid生成 UUID
v + 缩写符号表,如 vfh 杂项、vjt 箭头、vxh 星号
uU + 拼音拆字反查,比如嬲(uUnan)

其他