Rime (简体中文)
Rime(中州韵输入法引擎)是一款支持多种输入方案的输入法引擎。
Rime 本身没有用于处理用户输入的前端,需要配合输入法框架才能使用,比如 Fcitx5 (简体中文) 或 IBus (简体中文)。
安装
分别安装提供 Rime 输入引擎的 librime 和所使用输入法对应的集成:
- 若使用 Fcitx5 ,安装 fcitx5-rime;
- 若使用Fcitx ,安装 fcitx-rime;
- 若使用IBus ,安装 ibus-rime。
配置
Rime 需要输入方案才能工作,用户可以定制输入方案,也可以使用软件仓库中的一些官方输入方案:
- rime-luna-pinyin - 朙月拼音
- rime-terra-pinyin - 地球拼音
- rime-double-pinyin - 基于朙月拼音的双拼输入,包含自然码、MSPY、智能 ABC、小鹤双拼、拼音加加等
- rime-pinyin-simp - 袖珍简化字拼音
- rime-cantonese - 粤语拼音
- rime-cangjie - 仓颉五代
- rime-quick - 速成
- rime-stroke - 五笔画(笔画输入法)
- rime-wubi - 五笔字型86
- rime-wugniu - 上海吴语
- rime-bopomofo - 注音
- rime-emoji - Emoji 表情符号输入
有些输入方式会默认同 librime-data 元软件包一同安装,librime 也依赖此元软件包。
使用 Rime 时,默认可以按 F4 或 Ctrl+` 切换输入法,详见#选择输入方案。
若要自定义 Rime,请先根据使用的输入法创建 Rime 的配置文件夹:
若使用 ibus-rime:
$ mkdir ~/.config/ibus/rime
若使用 fcitx-rime:
$ mkdir ~/.config/fcitx/rime/
若使用 fcitx5-rime:
$ mkdir ~/.local/share/fcitx5/rime/
在文件夹中创建 default.custom.yaml 文件,以指定可选的输入法。例如,若要按声调输入拼音,添加下列内容以使用地球拼音:
default.custom.yaml
patch:
  schema_list:
    - schema: terra_pinyin
添加内容时请注意行首缩进。此文件会覆盖默认的配置文件,若只在文件中添加地球拼音,则只能用地球拼音。
请重新部署输入法以使自定义生效。如果使用图形界面的 IBus 或 Fcitx,请点击 ⟲(重新部署)按钮。也可以使用命令行重新部署:
若使用 ibus-rime:
$ rm ~/.config/ibus/rime/default.yaml && ibus-daemon -drx
若使用 fcitx-rime:
$ rm ~/.config/fcitx/rime/default.yaml && fcitx-remote -r
若使用 fcitx5-rime:
$ rm ~/.local/share/fcitx5/rime/default.yaml $ fcitx5-remote -r
注意:可以选择声调以过滤候选列表,对应按键如下:
一声: - 二声: / 三声: < 四声: \
例如,若要打出拼音为 hǎo 的字,输入 hao< 即可。
Rime 默认只会列出 5 个候选项,可以修改 "menu/page_size" 的值以改变列出候选项的数量:
default.custom.yaml
patch:
     "menu/page_size": 9
使用
选择输入方案
使用 Rime 时,默认可以按 F4 或 Ctrl+` 调整基础设置。显示的设置项如下:
1. 输入法名称 2. 中文 -› 西文 3. 全角 -› 半角 4. 漢字 -› 汉字 ...
第一项会显示输入方案的名称,可以在其中切换已启用的不同输入方案。
第二项可以切换中文/英文输入。
第三项可以切换全角/半角标点。
第四项可以切换简体/繁体输入。
中文标点
按下列各键输入不同的符号:
[ -> 「 【 〔 [
] -> 」 】 〕 ]
{ -> 『 〖 {
} -> 』 〗 }
< -> 《 〈 « ‹
> -> 》 〉 » ›
@ -> @ @ ☯
/ -> / / ÷
* -> * * ・ × ※
% -> % % ° ℃
$ -> ¥ $ € £ ¥
| -> ・ | | § ¦
_ -> ——
\ -> 、 \ \
^ -> ……
~ -> 〜 ~ ~ 〰
进阶内容
若要查看详细的 Rime 定制指南,见 https://github.com/rime/home/wiki/CustomizationGuide 。
疑难解答
GNOME 环境下,ibus-setup 无法更改候选方向
见 issue #52。 创建 ~/.config/ibus/rime/build/ibus_rime.yaml 并写入以下内容:
style: horizontal: true
技巧
输入希腊字母
若想输入希腊字母,请在 luna_pinyin.custom.yaml 或自定义输入方案文件中追加以下内容:
luna_pinyin.custom.yaml
recognizer:
  patterns:
    # Use / as the identifier here
    # You can freely replace your favorite identifiers (such as: `~, .\; etc., characters that need not be displayed directly on the screen)
    # Replace the / before the Greek letter at the same time
    punct: "^/([0-9]0?|[A-Za-z]+)$"
punctuator:
  symbols:
    # Here, the letter name is used as the code of the Greek letter, and you can replace it with your favorite code as needed.
    # For example, if you want to use a as the alpha code
    # just replace the alpha below with a
    "/alpha": ["Α", "α"]
    "/beta": ["Β", "β"]
    "/gamma": ["Γ", "γ"]
    "/delta": ["Δ", "δ"]
    "/epsilon": ["Ε", "ε"]
    "/zeta": ["Ζ", "ζ"]
    "/eta": ["Η", "η"]
    "/theta": ["Θ", "θ"]
    "/iota": ["Ι", "ι"]
    "/kappa": ["Κ", "κ"]
    "/lambda": ["Λ", "λ"]
    "/mu": ["Μ", "μ"]
    "/nu": ["Ν", "ν"]
    "/xi": ["Ξ", "ξ"]
    "/omicron": ["Ο", "ο"]
    "/pi": ["Π", "π"]
    "/rho": ["Ρ","ρ"]
    "/sigma": ["Σ", "σ", "ς"]
    "/tau": ["Τ", "τ"]
    "/upsilon": ["Υ", "υ"]
    "/phi": ["Φ", "φ"]
    "/chi": ["Χ", "χ"]
    "/psi": ["Ψ", "ψ"]
    "/omega": ["Ω", "ω"]
在此输入配置下,输入 /alpha 即会出现候选词 α 。