从零开始配置Rime - 2019

本文是个人配置,仅供方法参考。

步骤一 - 安装

首先下载安装 Rime。

通过官网下载安装
https://bintray.com/rime/squirrel/release
通过 Homebrew
brew cask install squirrel

步骤二 - 配置

东风破

東風破中州韻輸入法引擎 的配置管理工具。

克隆仓库

git clone --depth 1 https://github.com/rime/plum.git
cd plum

生成配置模板

bash rime-install prelude luna-pinyin double-pinyin

步骤三

# squirrel.custom.yaml
patch:
  us_keyboard_layout: true # 鍵盤選項:應用美式鍵盤佈局
  show_notifications_when: growl_is_running # 狀態通知,默認裝有Growl時顯示,也可設爲全開(always)全關(never)
  style:
    color_scheme: psionics
    horizontal: true # 水平/竖直显示
    inline_preedit: false # 非內嵌編碼行
    border_color_width: 0
    border_height: 6
    border_width: 6
    candidate_format: '%c %@'
    corner_radius: 5
    font_face: PingFangSC
    font_point: 16
    hilited_corner_radius: 3
    label_font_point: 14

  'com.apple.Finder/ascii_mode': true
# default.custom.yaml
# 中西文切換鍵的默認設置寫在 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:
  schema_list:
    - schema: double_pinyin_flypy
    - schema: luna_pinyin_simp
  switcher/hotkeys:
    - F4
  switcher/save_options:
    - full_shape
    - ascii_punct
    - simplification
    - zh_hans
    - emoji_suggestion
  menu/page_size: 8
  ascii_composer/good_old_caps_lock: false
  ascii_composer/switch_key:
    Caps_Lock: noop
    Shift_L: commit_code
    Shift_R: commit_code
    Control_L: noop
    Control_R: noop
  key_binder/bindings:
    - { accept: 'Control+p', send: Up, when: composing }
    - { accept: 'Control+n', send: Down, when: composing }
    - { accept: 'Control+b', send: Left, when: composing }
    - { accept: 'Control+f', send: Right, when: composing }
    - { accept: 'Control+a', send: Home, when: composing }
    - { accept: 'Control+e', send: End, when: composing }
    - { accept: 'Control+d', send: Delete, when: composing }
    - { accept: 'Control+k', send: 'Shift+Delete', when: composing }
    - { accept: 'Control+h', send: BackSpace, when: composing }
    - { accept: 'Control+g', send: Escape, when: composing }
    - { accept: 'Control+bracketleft', send: Escape, when: composing }
    - { accept: 'Alt+v', send: Page_Up, when: composing }
    - { accept: 'Control+v', send: Page_Down, when: composing }
    # - {accept: ISO_Left_Tab, send: "Shift+Left", when: composing}
    - { accept: 'Shift+Tab', send: Page_Up, when: composing }
    - { accept: Tab, send: Page_Down, when: composing }
    - { accept: minus, send: Page_Up, when: has_menu }
    - { accept: equal, send: Page_Down, when: has_menu }

步骤四 - Emoji

bash rime-install emoji
bash rime-install emoji:customize:schema=luna_pinyin
bash rime-install emoji:customize:schema=double_pinyin

步骤五 - 扩充词库

git clone https://github.com/rime-aca/dictionaries.git

luna_pinyin.dict/下的以下文件拷贝到~/Library/Rime

luna_pinyin.extended.dict.yaml
luna_pinyin.cn_en.dict.yaml
luna_pinyin.hanyu.dict.yaml
luna_pinyin.poetry.dict.yaml

然后更改双拼和明月拼音的custom配置,修改后的配置文件如:

# ~/Library/Rime/double_pinyin_flypy.custom.yaml
patch:
  'translator/dictionary': luna_pinyin.extended
__patch:
  # Rx: emoji:customize:schema=double_pinyin_flypy {
  - patch/+:
      __include: emoji_suggestion:/patch
# }
Published At
This site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at https://wayjam.me.