Skip to content

Commit

Permalink
chore: add default config from rime prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
Bambooin committed Jun 18, 2021
1 parent d37ae03 commit f6e0448
Show file tree
Hide file tree
Showing 4 changed files with 362 additions and 39 deletions.
66 changes: 66 additions & 0 deletions common/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Rime default settings
# encoding: utf-8

config_version: '0.40'

schema_list:
- schema: luna_pinyin
- schema: luna_pinyin_simp
- schema: luna_pinyin_fluency
- schema: bopomofo
- schema: bopomofo_tw
- schema: cangjie5
- schema: stroke
- schema: terra_pinyin

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

menu:
page_size: 5

punctuator:
full_shape:
__include: punctuation:/full_shape
half_shape:
__include: punctuation:/half_shape

key_binder:
bindings:
__patch:
- key_bindings:/emacs_editing
- key_bindings:/move_by_word_with_tab
- key_bindings:/paging_with_minus_equal
- key_bindings:/paging_with_comma_period
- key_bindings:/numbered_mode_switch

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
67 changes: 67 additions & 0 deletions common/key_bindings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Rime key bindings
# encoding: utf-8

emacs_editing:
__append:
- { 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: Control+y, send: Page_Up }
- { when: composing, accept: Alt+v, send: Page_Up }
- { when: composing, accept: Control+v, send: Page_Down }

move_by_word_with_tab:
__append:
- { when: composing, accept: ISO_Left_Tab, send: Shift+Left }
- { when: composing, accept: Shift+Tab, send: Shift+Left }
- { when: composing, accept: Tab, send: Shift+Right }

paging_with_minus_equal:
__append:
- { when: has_menu, accept: minus, send: Page_Up }
- { when: has_menu, accept: equal, send: Page_Down }

paging_with_comma_period:
__append:
- { when: paging, accept: comma, send: Page_Up }
- { when: has_menu, accept: period, send: Page_Down }

paging_with_brackets:
__append:
- { when: paging, accept: bracketleft, send: Page_Up }
- { when: has_menu, accept: bracketright, send: Page_Down }

numbered_mode_switch:
__append:
- { 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 }

windows_compatible_mode_switch:
__append:
- { when: always, accept: Shift+space, toggle: full_shape }
- { when: always, accept: Control+period, toggle: ascii_punct }

optimized_mode_switch:
__append:
- { when: always, accept: Control+Shift+space, select: .next }
- { when: always, accept: Shift+space, toggle: ascii_mode }
- { when: always, accept: Control+comma, toggle: full_shape }
- { when: always, accept: Control+period, toggle: ascii_punct }
- { when: always, accept: Control+slash, toggle: simplification }
- { when: always, accept: Control+backslash, toggle: extended_charset }
105 changes: 105 additions & 0 deletions common/punctuation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Rime basic symbols
# encoding: utf-8

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

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

ascii_style:
',' : { commit: ',' }
'.' : { commit: '.' }
'<' : '<'
'>' : '>'
'/' : '/'
'?' : { commit: '?' }
';' : { commit: ';' }
':' : { commit: ':' }
"'" : "'"
'"' : '"'
'\' : '\'
'|' : '|'
'`' : '`'
'~' : '~'
'!' : { commit: '!' }
'@' : '@'
'#' : '#'
'%' : '%'
'$' : '$'
'^' : '^'
'&' : '&'
'*' : '*'
'(' : '('
')' : ')'
'-' : '-'
'_' : '_'
'+' : '+'
'=' : '='
'[' : '['
']' : ']'
'{' : '{'
'}' : '}'
Loading

0 comments on commit f6e0448

Please sign in to comment.