# Rime

From ArchWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Rime is an input method engine for entering Chinese characters supporting a wide range of input methods.

Rime engine itself does not provide a frontend for receiving user input. It must be used with input method frameworks such as Fcitx or IBus.

## Installation

Rime is provided by librime and can be used with ibus-rime or fcitx-rime.

## Configuration

Note: Rime works with ibus or fcitx. Please see also IBus and Fcitx for installation and configuration.

In order for Rime to work, input schemas are needed. Schemas are text files that can be created and customized by users. Alternatively, there are several official input schemas available in package repository:

- rime-luna-pinyin - 朙月拼音 Standard Mandarin
- rime-terra-pinyin - 地球拼音 Mandarin with tones
- rime-double-pinyin - 自然碼雙拼
- rime-pinyin-simp - 袖珍简化字拼音 Simplified pinyin
- rime-cantonese - 粵語拼音 Cantonese pingjam
- rime-cangjie - 倉頡五代 Cangjie
- rime-quick - 速成 Quick
- rime-stroke - 五筆畫 Stroke
- rime-wubi - 五筆字型86 Wubi
- rime-wugniu - 上海吳語 wugniu
- rime-bopomofo - 注音 bopomofo
- rime-emoji - Emoji input

By default, some schemas is installed with librime-data meta package as it is a dependency of librime.

Some schema package provide more than one schemas. For example, rime-luna-pinyin provides 5 schemas including `luna_pinyin` and `luna_pinyin_fluency`. You can check content of each package from Rime GitHub organization.

You can switch input schema at any time by pressing `F4` to trigger the program menu. See Selecting Input Method.

To customize Rime, you should first create the rime config directory. Assuming you are using ibus-rime:

    $ mkdir ~/.config/ibus/rime

Or if you are using fcitx-rime:

    $ mkdir ~/.config/fcitx/rime/

Or if you are using Fcitx5:

    $ mkdir ~/.local/share/fcitx5/rime/

In this directory, create a file named `default.custom.yaml`, where you can specify your input schema of choice. For example, if you want to be able to type pinyin with tones, you can use the Terra Pinyin input method by adding it to the list of enabled schemas:

    default.custom.yaml

    patch:
      schema_list:
        - schema: terra_pinyin

Note that the indentation level is important. This file overrides the default configuration. So if you only add Terra Pinyin, it will be the only schema enabled.

To make the customizations effective, you need to redeploy. If you have working ibus or fcitx GUI, you may find a ⟲ (Deploy) button and click it. Alternatively, use the following command, assuming you are using ibus-rime:

    $ rm ~/.config/ibus/rime/default.yaml && ibus-daemon -drx

Or if you are using fcitx-rime:

    $ rm ~/.config/fcitx/rime/default.yaml && fcitx-remote -r

Or if you are using Fcitx5:

    $ rm ~/.local/share/fcitx5/rime/default.yaml
    $ fcitx5-remote -r

Note: Tones are optionals but you can type them to filter the list very well. Here is how to type them:

    1st tone: -
    2nd tone: /
    3rd tone: <
    4th tone: \

Example: if one wants to type `hǎo` to display only Chinese characters that are pronounced this way, one must type `hao<` and it will be automatically converted to hǎo.

By default, RIME only displays five candidates for input whilst typing. You can change this by setting the `"menu/page_size"` value manually.

    default.custom.yaml

    patch:
         "menu/page_size": 9

## Usage

Rime provides some great features that allow you to write Chinese characters and its punctuation well.

### Selecting Input Method

At any time, while running Rime, you can access some basic options with `F4`. The displayed options look like this:

    1.　Method name
    2. 中文　－›　西文
    3. 全角　－›　半角
    4. 漢字　－›　汉字
    etc.

The first one indicates the name of the method you have selected (Ex: 地球拼音 for Terra Pinyin). If you have enabled multiple input methods, you can switch between them.

The second one lets you switch between Chinese and western languages.

The third one lets you select if you want to type the punctuation in full width (全角) or in half width (半角).

The last one allows you to switch between traditional Chinese (漢字) and simplified Chinese (汉字).

### Chinese punctuation

You have access to all the Chinese punctuation thanks to Rime. Here is a little table showing you how to type some of them:

    [ -> 「　【　〔　［
    ] ->　」　】　〕　］
    { ->　『　〖　｛
    } ->　』　〗　｝
    < ->　《　〈　«　‹
    > ->　》　〉　»　›
    @ ->　＠　@　☯
    / ->　／　/　÷
    * ->　＊　*　・　×　※
    % ->　％　%　°　℃
    $ ->　￥　$　€　£　¥
    | ->　・　｜　|　§　¦
    _ -> ——
    \ ->　、　＼　\
    ^ ->　……
    ~ ->　〜　~　～　〰

### Advanced

Rime allows you to change everything you can imagine and more examples are provided on the website of the project (in Chinese): https://github.com/rime/home/wiki/CustomizationGuide

## TroubleShooting

### ibus-setup set orientation invaild in GNOME environment

Create `~/.config/ibus/rime/build/ibus_rime.yaml` with follows: [1]

    style:
      horizontal: true

## See also

- Official website
- GitHub wiki

Category:

- Input methods