Skip to content

Instantly share code, notes, and snippets.

@riskers
Last active November 25, 2023 12:50
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riskers/9bd441f0483325ef991f2b40da7d2eed to your computer and use it in GitHub Desktop.
Save riskers/9bd441f0483325ef991f2b40da7d2eed to your computer and use it in GitHub Desktop.
rime config
# Rime default settings
# encoding: utf-8
patch:
config_version: "1.6"
schema_list:
- schema: luna_pinyin_simp
switcher:
caption: 〔方案選單〕
hotkeys:
- Control+grave
- Control+Shift+grave
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
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 }
# move by word
- { when: composing, accept: ISO_Left_Tab, send: Shift+Left }
- { when: composing, accept: Shift+Tab, send: Shift+Left }
- { when: composing, accept: Tab, send: Shift+Right }
# flip page
- { 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: noop, 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]+[.].+$"
punct: "^/([A-Z|a-z]*|[0-9]|10)$"
ascii_composer:
good_old_caps_lock: true
switch_key:
Shift_L: noop
Shift_R: noop
Control_L: noop
Control_R: noop
Caps_Lock: clear
Eisu_toggle: clear
patch:
# 让 ` 符号能够上屏
recognizer/patterns/reverse_lookup:
# Rime dictionary
# encoding: utf-8
# Luna Pinyin Extended Dictionary(Basic) - 明月拼音扩充词库(基本)
---
name: luna_pinyin.extended # 词库名
version: "2021.02.07"
sort: by_weight # by_weight(按词频高低排序)或 original(保持原码表中的顺序)
use_preset_vocabulary: true # true 或 false,选择是否导入预设词汇表【八股文】
import_tables:
- luna_pinyin
# - luna_pinyin.sogou # 可以不用
patch:
preset_color_schemes:
apathy:
author: "LIANG Hai"
back_color: 0xFFFFFF
border_height: 0
border_width: 0
candidate_format: "%c %@ "
comment_text_color: 0x999999
corner_radius: 5
font_face: "PingFangSC-Regular,HanaMinB"
font_point: 16
hilited_candidate_back_color: 0xFFF0E4
hilited_candidate_text_color: 0xEE6E00
horizontal: true
inline_preedit: true
label_font_face: "STHeitiSC-Light"
label_font_point: 12
name: "冷漠/Apathy"
text_color: 0x424242
aqua:
author: "佛振 <chen.sst@gmail.com>"
back_color: 0xeeeceeee
candidate_text_color: 0x000000
comment_text_color: 0x5a5a5a
hilited_candidate_back_color: 0xeefa3a0a
hilited_candidate_text_color: 0xffffff
hilited_comment_text_color: 0xfcac9d
hilited_text_color: 0x000000
name: "碧水/Aqua"
text_color: 0x606060
azure:
author: "佛振 <chen.sst@gmail.com>"
back_color: 0xee8b4e01
candidate_text_color: 0xffeacc
comment_text_color: 0xc69664
hilited_candidate_back_color: 0x00000000
hilited_candidate_text_color: 0x7ffeff
hilited_text_color: 0xffeacc
name: "青天/Azure"
text_color: 0xcfa677
clean_white:
author: "Chongyu Zhu <lembacon@gmail.com>, based on 搜狗「简约白」"
back_color: 0xeeeeee
border_height: 6
border_width: 6
candidate_format: "%c %@"
candidate_text_color: 0x000000
comment_text_color: 0x808080
corner_radius: 6
font_point: 16
hilited_candidate_back_color: 0xeeeeee
hilited_candidate_label_color: 0xa0c98915
hilited_candidate_text_color: 0xc98915
hilited_text_color: 0x000000
horizontal: true
label_color: 0x888888
label_font_point: 12
name: "简约白/Clean White"
text_color: 0x808080
dark_temple:
author: "佛振 <chen.sst@gmail.com>, based on ir_black"
back_color: 0x222222
candidate_text_color: 0xd8e3e6
comment_text_color: 0x606cff
hilited_back_color: 0x222222
hilited_candidate_back_color: 0x10000000
hilited_candidate_text_color: 0x92f6da
hilited_text_color: 0xffcf9a
name: "暗堂/Dark Temple"
text_color: 0x92f6da
dust:
author: "Superoutman <asticosmo@gmail.com>"
back_color: 0xeeffffff
border_color: 0xE0B693
border_height: 3
border_width: 8
candidate_format: "%c %@ "
candidate_text_color: 0x555555
comment_text_color: 0x999999
corner_radius: 2
font_face: "HYQiHei-55S Book,HanaMinA Regular"
font_point: 14
hilited_candidate_back_color: 0xfff0e4
hilited_candidate_label_color: 0x555555
hilited_candidate_text_color: 0x000000
hilited_comment_text_color: 0x9e9e9e
hilited_text_color: 0x9e9e9e
horizontal: true
inline_preedit: true
label_color: 0xcbcbcb
label_font_face: SimHei
label_font_point: 10
name: "浮尘/Dust"
text_color: 0x9e9e9e
google:
author: "skoj <skoj@qq.com>"
back_color: 0xFFFFFF
border_color: 0xE2E2E2
candidate_text_color: 0x000000
comment_text_color: 0x6D6D6D
hilited_back_color: 0xFFFFFF
hilited_candidate_back_color: 0xCE7539
hilited_candidate_text_color: 0xFFFFFF
hilited_comment_text_color: 0xEBC6B0
hilited_text_color: 0x000000
name: "谷歌/Google"
text_color: 0x666666
ink:
author: "佛振 <chen.sst@gmail.com>"
back_color: 0xeeffffff
candidate_text_color: 0x000000
comment_text_color: 0x5a5a5a
hilited_candidate_back_color: 0xcc000000
hilited_candidate_text_color: 0xffffff
hilited_comment_text_color: 0x808080
hilited_text_color: 0x000000
name: "墨池/Ink"
text_color: 0x5a5a5a
lost_temple:
author: "佛振 <chen.sst@gmail.com>, based on ir_black"
back_color: 0xee303030
comment_text_color: 0xbb82e6ca
hilited_candidate_back_color: 0x82e6ca
hilited_candidate_text_color: 0x000000
hilited_comment_text_color: 0xbb203d34
hilited_text_color: 0x82e6ca
name: "孤寺/Lost Temple"
text_color: 0xe8f3f6
luna:
author: "佛振 <chen.sst@gmail.com>"
back_color: 0xdd000000
candidate_text_color: 0xeceeee
comment_text_color: 0xa5a5a5
hilited_candidate_back_color: 0x40000000
hilited_candidate_text_color: 0x7fffff
hilited_comment_text_color: 0x449c9d
hilited_text_color: 0x7fffff
name: "明月/Luna"
text_color: 0xa5a5a5
mojave_dark:
author: "xiehuc <xiehuc@gmail.com>"
back_color: 0x252320
border_color: 0x020202
border_color_width: 0
border_height: 6
border_width: 6
candidate_format: "%c %@"
candidate_text_color: 0xdedddd
comment_text_color: 0xdedddd
corner_radius: 5
font_face: PingFangSC
font_point: 16
hilited_back_color: 0x252320
hilited_candidate_back_color: 0xcb5d00
hilited_candidate_label_color: 0xffffff
hilited_candidate_text_color: 0xffffff
hilited_corner_radius: 3
hilited_text_color: 0xdedddd
horizontal: true
inline_preedit: true
label_color: 0x888785
label_font_point: 14
name: "沙漠夜/Mojave Dark"
text_color: 0xdedddd
psionics:
author: "雨過之後、佛振"
back_color: 0x444444
candidate_text_color: 0xeeeeee
comment_text_color: 0x808080
hilited_back_color: 0x444444
hilited_candidate_back_color: 0xd8bf00
hilited_candidate_label_color: 0xfafafa
hilited_candidate_text_color: 0xfafafa
hilited_comment_text_color: 0x444444
hilited_text_color: 0xeeeeee
name: "幽能/Psionics"
text_color: 0xc2c2c2
purity_of_essence:
author: "佛振"
back_color: 0xfafafa
candidate_text_color: 0x000000
comment_text_color: 0x808080
hilited_back_color: 0xfafafa
hilited_candidate_back_color: 0x444444
hilited_candidate_text_color: 0xeeeeee
hilited_text_color: 0x000000
name: "純粹的本質/Purity of Essence"
text_color: 0x2c2ccc
purity_of_form:
author: "雨過之後、佛振"
back_color: 0x444444
candidate_text_color: 0xeeeeee
comment_text_color: 0x808080
hilited_back_color: 0x444444
hilited_candidate_back_color: 0xfafafa
hilited_candidate_text_color: 0x000000
hilited_text_color: 0xeeeeee
name: "純粹的形式/Purity of Form"
text_color: 0xc2c2c2
solarized_rock:
author: "Aben <tntaben@gmail.com>, based on Ethan Schoonover's Solarized color scheme"
back_color: 0x362b00
border_color: 0x362b00
candidate_text_color: 0x969483
comment_text_color: 0xc098a12a
hilited_candidate_back_color: 0x8236d3
hilited_candidate_text_color: 0xffffff
hilited_comment_text_color: 0x362b00
hilited_text_color: 0x98a12a
name: "曬經石/Solarized Rock"
text_color: 0x8236d3
starcraft:
author: "Contralisk <contralisk@gmail.com>, original artwork by Blizzard Entertainment"
back_color: 0xee000000
border_color: 0x1010a0
candidate_text_color: 0x30bb55
comment_text_color: 0x1010d0
hilited_back_color: 0x000000
hilited_candidate_back_color: 0x00000000
hilited_candidate_text_color: 0x70ffaf
hilited_comment_text_color: 0x1010f0
hilited_text_color: 0xfecb96
name: "星際我爭霸/StarCraft"
text_color: 0xccaa88
pure:
author: "riskers <gaoyibobobo@gmail.com>"
font_point: 16
font_face: "Microsoft YaHei Mono"
label_font_point: 16
label_font_face: "Microsoft YaHei Mono"
label_color: 0xf2a45a #预选栏编号颜色
back_color: 0xededed #背景颜色
border_color: 0xededed
candidate_text_color: 0x787878 #非第一后选项文字颜色
comment_text_color: 0xcccccc #注解文字颜色
hilited_candidate_back_color: 0xededed #第一后选项背景颜色
hilited_candidate_text_color: 0xff7d00 #第一后选项文字颜色
hilited_comment_text_color: 0x00a5ea #注解文字高亮
hilited_text_color: 0x7fffff #拼音串高亮(需要开启内嵌编码)
text_color: 0xa5a5a5 #拼音串颜色(需要开启内嵌编码)
corner_radius: 5
border_height: 8
border_width: 8
show_notifications_when: appropriate
style:
border_height: 0
border_width: 0
color_scheme: pure
# corner_radius: 10
# font_face: "Lucida Grande"
horizontal: true
inline_preedit: true
# line_spacing: 5
# spacing: 10
us_keyboard_layout: false
app_options:
co.zeit.hyper:
ascii_mode: true
com.alfredapp.Alfred:
ascii_mode: true
com.apple.Spotlight:
ascii_mode: true
com.apple.Terminal:
ascii_mode: true
no_inline: true
com.apple.dt.Xcode:
ascii_mode: false
com.barebones.textwrangler:
ascii_mode: true
com.blacktree.Quicksilver:
ascii_mode: true
com.github.atom:
ascii_mode: false
com.googlecode.iterm2:
ascii_mode: false
com.macromates.TextMate.preview:
ascii_mode: true
com.microsoft.VSCode:
ascii_mode: false
"com.runningwithcrayons.Alfred-2":
ascii_mode: true
com.sublimetext.2:
ascii_mode: true
org.gnu.Aquamacs:
ascii_mode: true
org.gnu.Emacs:
ascii_mode: true
no_inline: true
org.vim.MacVim:
ascii_mode: true
no_inline: true
# Rime's punctuation and symbols
# encoding: utf-8
#
# Usage: patch your Rime schema to enable /X symbols
config_version: '1.6'
patch:
punctuator/import_preset: symbols
recognizer/patterns/punct: '^/([0-9]0?|[A-Za-z]+)$'
punctuator:
full_shape:
' ' : { commit: ' ' }
',' : { commit: , }
'.' : { commit: 。 }
'<' : [ 《, 〈, «, ‹ ]
'>' : [ 》, 〉, », › ]
'/' : [ /, ÷ ]
'?' : { commit: ? }
';' : { commit: ; }
':' : { commit: : }
'''' : { pair: [ '‘', '’' ] }
'"' : { pair: [ '“', '”' ] }
'\' : [ 、, \ ]
'|' : [ ·, |, '§', '¦' ]
'`' : `
'~' : ~
'!' : { commit: ! }
'@' : [ @, ☯ ]
'#' : [ #, ⌘ ]
'%' : [ %, '°', '℃' ]
'$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ]
'^' : { commit: …… }
'&' : &
'*' : [ *, ·, ・, ×, ※, ❂ ]
'(' : (
')' : )
'-' : -
'_' : ——
'+' : +
'=' : =
'[' : [ 「, 【, 〔, [ ]
']' : [ 」, 】, 〕, ] ]
'{' : [ 『, 〖, { ]
'}' : [ 』, 〗, } ]
half_shape:
',' : { commit: , }
'.' : { commit: 。 }
'<' : 《
'>' : 》
'/' : 、
'?' : { commit: ? }
';' : { commit: ; }
':' : { commit: : }
'''' : { pair: [ '‘', '’' ] }
'"' : { pair: [ '「', '」' ] }
'\' : [ 、, '\', \ ]
'|' : '|'
'`' : '`'
'~' : [ '~', ~ ]
'!' : { commit: ! }
'@' : '@'
'#' : '#'
'%' : [ '%', %, '°', '℃' ]
'$' : ¥
'^' : { commit: …… }
'&' : '&'
'*' : '*'
'(' : (
')' : )
'-' : '-'
'_' : ——
'+' : '+'
'=' : '='
'[' : [ 「, 【, 〔, [ ]
']' : [ 」, 】, 〕, ] ]
'{' : 『
'}' : 』
@riskers
Copy link
Author

riskers commented Jan 3, 2019

从 0.9 升级到 0.10 后可能会有麻烦,可以先删除 ~/Library/Rime,然后重新安装 0.10

  1. 升级 0.10 之后不仅要安装 rime ,还要安装输入方案:
curl -fsSL https://git.io/rime-install | bash
  1. 然后新建 default.custom.yamlsquirrel.custom.yaml,使用简体中文的朋友可以直接复制使用上面的文件:
  • default.custom.yaml: 修改符号映射
  • squirrel.custom.yaml: 修改主题样式
  1. 覆盖 symbols.yaml,本来不应该覆盖,但是没有好办法,不想研究了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment