leohxj
11/18/2017 - 4:06 PM

RIME-config

RIME-config

# Squirrel settings
# encoding: utf-8

config_version: "0.22"

us_keyboard_layout: false

# for veteran chord-typist
chord_duration: 0.1  # seconds

# options: always | never | appropriate
show_notifications_when: appropriate

# Show notifications via Notification Center instead of Growl.
# (Only valid if OS version is at least 10.8 and
#  'show_notifications_when' is NOT set to 'never'.)
show_notifications_via_notification_center: false

style:
  color_scheme: native
  horizontal: false
  inline_preedit: true
  corner_radius: 10
  border_height: 0
  border_width: 0
  line_spacing: 1
  spacing: 5  # space between preedit and candidates in non-inline mode
  #candidate_format: '%c. %@ '
  font_face: 'Lucida Grande'  # supporting soft cursor '›'
  #font_point: 21
  #label_font_face: 'STHeitiTC-Medium'
  #label_font_point: 18

preset_color_schemes:
  aqua:
    name: 碧水/Aqua
    author: 佛振 <chen.sst@gmail.com>
    text_color: 0x606060
    back_color: 0xeeeceeee
    candidate_text_color: 0x000000
    hilited_text_color: 0x000000
    hilited_candidate_text_color: 0xffffff
    hilited_candidate_back_color: 0xeefa3a0a
    comment_text_color: 0x5a5a5a
    hilited_comment_text_color: 0xfcac9d

  azure:
    name: 青天/Azure
    author: 佛振 <chen.sst@gmail.com>
    text_color: 0xcfa677
    candidate_text_color: 0xffeacc
    back_color: 0xee8b4e01
    hilited_text_color: 0xffeacc
    hilited_candidate_text_color: 0x7ffeff
    hilited_candidate_back_color: 0x00000000
    comment_text_color: 0xc69664

  luna:
    name: 明月/Luna
    author: 佛振 <chen.sst@gmail.com>
    text_color: 0xa5a5a5
    back_color: 0xdd000000
    candidate_text_color: 0xeceeee
    hilited_text_color: 0x7fffff
    hilited_candidate_text_color: 0x7fffff
    hilited_candidate_back_color: 0x40000000
    comment_text_color: 0xa5a5a5
    hilited_comment_text_color: 0x449c9d

  ink:
    name: 墨池/Ink
    author: 佛振 <chen.sst@gmail.com>
    text_color: 0x000000
    back_color: 0xeeffffff
    candidate_text_color: 0x000000
    hilited_text_color: 0x000000
    hilited_back_color: 0xdddddd
    hilited_candidate_text_color: 0xffffff
    hilited_candidate_back_color: 0xcc000000
    comment_text_color: 0x5a5a5a
    hilited_comment_text_color: 0x808080

  lost_temple:
    name: 孤寺/Lost Temple
    author: 佛振 <chen.sst@gmail.com>, based on ir_black
    text_color: 0xe8f3f6
    back_color: 0xee303030
    hilited_text_color: 0x82e6ca
    hilited_candidate_text_color: 0x000000
    hilited_candidate_back_color: 0x82e6ca
    comment_text_color: 0xbb82e6ca
    hilited_comment_text_color: 0xbb203d34

  dark_temple:
    name: 暗堂/Dark Temple
    author: 佛振 <chen.sst@gmail.com>, based on ir_black
    text_color: 0x92f6da
    back_color: 0x222222
    candidate_text_color: 0xd8e3e6
    hilited_text_color: 0xffcf9a
    hilited_back_color: 0x222222
    hilited_candidate_text_color: 0x92f6da
    hilited_candidate_back_color: 0x10000000  # 0x333333
    comment_text_color: 0x606cff

  starcraft:
    name: 星際我爭霸/StarCraft
    author: Contralisk <contralisk@gmail.com>, original artwork by Blizzard Entertainment
    text_color: 0xccaa88
    candidate_text_color: 0x30bb55
    back_color: 0xee000000
    border_color: 0x1010a0
    hilited_text_color: 0xfecb96
    hilited_back_color: 0x000000
    hilited_candidate_text_color: 0x70ffaf
    hilited_candidate_back_color: 0x00000000
    comment_text_color: 0xfecb96

  google:
    name: 谷歌/Google
    author: skoj <skoj@qq.com>
    text_color: 0x666666 #拼音串
    candidate_text_color: 0x000000 #非第一候选项
    back_color: 0xFFFFFF #背景
    border_color: 0xE2E2E2 #边框
    hilited_text_color: 0x000000 #拼音串高亮
    hilited_back_color: 0xFFFFFF #拼音串高亮背景
    hilited_candidate_text_color: 0xFFFFFF #第一候选项
    hilited_candidate_back_color: 0xCE7539 #第一候选项背景
    comment_text_color: 0x6D6D6D #注解文字
    hilited_comment_text_color: 0xEBC6B0 #注解文字高亮

  solarized_rock:
    name: 曬經石/Solarized Rock
    author: Aben <tntaben@gmail.com>, based on Ethan Schoonover's Solarized color scheme
    back_color: 0x362b00
    border_color: 0x362b00
    text_color: 0x009985
    hilited_text_color: 0x98a12a
    candidate_text_color: 0x969483
    hilited_candidate_text_color: 0xffffff
    hilited_candidate_back_color: 0x8236d3
    hilited_comment_text_color: 0x362b00

  clean_white:
    name: 简约白/Clean White
    author: Chongyu Zhu <lembacon@gmail.com>, based on 搜狗「简约白」
    horizontal: true
    candidate_format: '%c %@ '
    corner_radius: 6
    border_height: 6
    border_width: 6
    font_point: 16
    label_font_point: 12
    label_color: 0x888888
    text_color: 0x808080
    hilited_text_color: 0x000000
    candidate_text_color: 0x000000
    comment_text_color: 0x808080
    back_color: 0xeeeeee
    hilited_candidate_label_color: 0xa0c98915
    hilited_candidate_text_color: 0xc98915
    hilited_candidate_back_color: 0xeeeeee

app_options:
  com.alfredapp.Alfred:
    ascii_mode: true
  com.runningwithcrayons.Alfred-2:
    ascii_mode: true
  com.blacktree.Quicksilver:
    ascii_mode: true
  com.apple.Terminal:
    ascii_mode: true
    no_inline: true
  com.googlecode.iterm2:
    ascii_mode: true
  org.vim.MacVim:
    ascii_mode: true
    no_inline: true
  #com.apple.dt.Xcode:
  #  ascii_mode: true
  #com.barebones.textwrangler:
  #  ascii_mode: true
  #com.macromates.TextMate.preview:
  #  ascii_mode: true
  #com.sublimetext.2:
  #  ascii_mode: true
  #org.gnu.Aquamacs:
  #  ascii_mode: true
  #org.gnu.Emacs:
  #  ascii_mode: true
# Rime schema
# encoding: utf-8

schema:
  schema_id: luna_pinyin
  name: 朙月拼音
  version: "0.22"
  author:
    - 佛振 <chen.sst@gmail.com>
  description: |
    Rime 預設的拼音輸入方案。
    參考以下作品而創作:
      * CC-CEDICT
      * Android open source project
      * Chewing - 新酷音
      * opencc - 開放中文轉換
  dependencies:
    - stroke

switches:
  - name: ascii_mode
    reset: 0
    states: [ 中文, 西文 ]
  - name: full_shape
    states: [ 半角, 全角 ]
  - name: simplification
    states: [ 漢字, 汉字 ]
  - name: ascii_punct
    states: [ 。,, ., ]

engine:
  processors:
    - ascii_composer
    - recognizer
    - key_binder
    - speller
    - punctuator
    - selector
    - navigator
    - express_editor
  segmentors:
    - ascii_segmentor
    - matcher
    - abc_segmentor
    - punct_segmentor
    - fallback_segmentor
  translators:
    - punct_translator
    - table_translator@custom_phrase
    - reverse_lookup_translator
    - script_translator
  filters:
    - simplifier
    - uniquifier

speller:
  alphabet: zyxwvutsrqponmlkjihgfedcba
  delimiter: " '"
  algebra:
    - erase/^xx$/
    - abbrev/^([a-z]).+$/$1/
    - abbrev/^([zcs]h).+$/$1/
    - derive/^([nl])ve$/$1ue/
    - derive/^([jqxy])u/$1v/
    - derive/un$/uen/
    - derive/ui$/uei/
    - derive/iu$/iou/
    - derive/([aeiou])ng$/$1gn/
    - derive/([dtngkhrzcs])o(u|ng)$/$1o/
    - derive/ong$/on/
    - derive/ao$/oa/
    - derive/([iu])a(o|ng?)$/a$1$2/

translator:
  dictionary: luna_pinyin
  preedit_format:
    - xform/([nl])v/$1ü/
    - xform/([nl])ue/$1üe/
    - xform/([jqxy])v/$1u/

custom_phrase:
  dictionary: ""
  user_dict: custom_phrase
  db_class: stabledb
  enable_completion: false
  enable_sentence: false
  initial_quality: 1

reverse_lookup:
  dictionary: stroke
  enable_completion: true
  prefix: "`"
  suffix: "'"
  tips: 〔筆畫〕
  preedit_format:
    - xlit/hspnz/一丨丿丶乙/
  comment_format:
    - xform/([nl])v/$1ü/

punctuator:
  import_preset: symbols

key_binder:
  import_preset: default

recognizer:
  import_preset: default
  patterns:
    # hack: to enable "/fh" style symbols, '/' must be mapped to a [list].
    # so those who have customized '/' for direct commit won't be affected by
    # this change.
    punct: "^/([0-9]+[a-z]*|[a-z]+)$"
    reverse_lookup: "`[a-z]*'?$"
# Rime default settings
# encoding: utf-8

config_version: "0.36"

schema_list:
  - schema: luna_pinyin
  - schema: cangjie5
  - schema: luna_pinyin_fluency
  - schema: luna_pinyin_simp
  - schema: luna_pinyin_tw

switcher:
  caption: 〔方案選單〕
  hotkeys:
    - Control+grave
    - Control+Shift+grave
    - F4
  save_options:
    - full_shape
    - ascii_punct
    - simplification
    - extended_charset
  fold_options: true
  abbreviate_options: true
  option_list_separator: '/'

menu:
  page_size: 5

punctuator:
  full_shape:
    ' ' : { commit: ' ' }
    ',' : { commit: , }
    '.' : { commit: 。 }
    '<' : [ 《, 〈, «, ‹ ]
    '>' : [ 》, 〉, », › ]
    '/' : [ /, ÷ ]
    '?' : { commit: ? }
    ';' : { commit: ; }
    ':' : { commit: : }
    '''' : { pair: [ '‘', '’' ] }
    '"' : { pair: [ '“', '”' ] }
    '\' : [ 、, \ ]
    '|' : [ ·, |, '§', '¦' ]
    '`' : `
    '~' : ~
    '!' : { commit: ! }
    '@' : [ @, ☯ ]
    '#' : [ #, ⌘ ]
    '%' : [ %, '°', '℃' ]
    '$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ]
    '^' : { commit: …… }
    '&' : &
    '*' : [ *, ·, ・, ×, ※, ❂ ]
    '(' : (
    ')' : )
    '-' : -
    '_' : ——
    '+' : +
    '=' : =
    '[' : [ 「, 【, 〔, [ ]
    ']' : [ 」, 】, 〕, ] ]
    '{' : [ 『, 〖, { ]
    '}' : [ 』, 〗, } ]
  half_shape:
    ',' : { commit: , }
    '.' : { commit: 。 }
    '<' : [ 《, 〈, «, ‹ ]
    '>' : [ 》, 〉, », › ]
    '/' : [ 、, '/', /, ÷ ]
    '?' : { commit: ? }
    ';' : { commit: ; }
    ':' : { commit: : }
    '''' : { pair: [ '‘', '’' ] }
    '"' : { pair: [ '“', '”' ] }
    '\' : [ 、, '\', \ ]
    '|' : [ ·, '|', |, '§', '¦' ]
    '`' : '`'
    '~' : [ '~', ~ ]
    '!' : { commit: ! }
    '@' : '@'
    '#' : '#'
    '%' : [ '%', %, '°', '℃' ]
    '$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ]
    '^' : { commit: …… }
    '&' : '&'
    '*' : [ '*', *, ·, ・, ×, ※, ❂ ]
    '(' : (
    ')' : )
    '-' : '-'
    '_' : ——
    '+' : '+'
    '=' : '='
    '[' : [ 「, 【, 〔, [ ]
    ']' : [ 」, 】, 〕,  ] ]
    '{' : [ 『, 〖, { ]
    '}' : [ 』, 〗, } ]

key_binder:
  bindings:
    # Emacs style
    - { when: composing, 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 }
    # paging keys
    - { when: composing, accept: ISO_Left_Tab, send: Page_Up }
    - { when: composing, accept: Shift+Tab, send: Page_Up }
    - { when: composing, accept: Tab, send: Page_Down }
    - { when: has_menu, accept: minus, send: Page_Up }
    - { when: has_menu, accept: equal, send: Page_Down }
    - { when: paging, accept: comma, send: Page_Up }
    - { when: has_menu, accept: period, send: Page_Down }
    # hotkey switch
    - { when: always, accept: Control+Shift+1, select: .next }
    - { when: always, accept: Control+Shift+2, toggle: ascii_mode }
    - { when: always, accept: Control+Shift+3, toggle: full_shape }
    - { when: always, accept: Control+Shift+4, toggle: simplification }
    - { when: always, accept: Control+Shift+5, toggle: extended_charset }
    - { when: always, accept: Control+Shift+exclam, select: .next }
    - { when: always, accept: Control+Shift+at, toggle: ascii_mode }
    - { when: always, accept: Control+Shift+numbersign, toggle: full_shape }
    - { when: always, accept: Control+Shift+dollar, toggle: simplification }
    - { when: always, accept: Control+Shift+percent, toggle: extended_charset }
    - { when: always, accept: Shift+space, toggle: full_shape }
    - { when: always, accept: Control+period, toggle: ascii_punct }

recognizer:
  patterns:
    email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$"
    uppercase: "[A-Z][-_+.'0-9A-Za-z]*$"
    url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$"

ascii_composer:
  good_old_caps_lock: true
  switch_key:
    Shift_L: inline_ascii
    Shift_R: commit_text
    Control_L: noop
    Control_R: noop
    Caps_Lock: clear
    Eisu_toggle: clear