Skip to content

Commit

Permalink
兼容 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oott123 committed Jan 8, 2019
1 parent e0456d7 commit bf56048
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 47 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# 个人 Rime 配置方案

一份符合个人习惯的 rime 配置方案。
一份符合个人习惯的 rime 配置方案。支持鼠须管 0.10.0。

## 配置要点

### 配置管理

* 采用 [東風破](https://github.com/rime/plum) 安装一些第三方配置。
* 目前本身并不是可被 plum 安装的包。后续可能将一些功能拆分到独立的 plum 包中。

### 输入

* 采用 `ub` 开头输入笔画(h横s竖p撇n捺z折)
Expand Down Expand Up @@ -41,4 +46,4 @@ cd ~/.rime_config

### 其它前端

下载后将 `Rime` 文件夹内的内容覆盖或者软链接到你的配置文件夹。
下载后将 `Rime` 文件夹内的内容覆盖或者软链接到你的配置文件夹。请注意参考 deploy 脚本安装 plum 包。
28 changes: 15 additions & 13 deletions Rime/luna_pinyin.extended/symbols.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,37 @@ punctuator:
'.' : { commit: 。 }
'<' : [ 《, 〈, «, ‹, ˂, ˱ ]
'>' : [ 》, 〉, », ›, ˃, ˲ ]
'/' : [ 、, 、, '/', /, ÷ ]
'/': {commit: '/'}
'?' : { commit: ? }
';' : { commit: ; }
':' : { commit: : }
'''' : { pair: [ '‘', '’' ] }
'"' : { pair: [ '“', '”' ] }
'\' : [ 、, '\', \ ]
'|' : [ ·, ・, '|', |, '§', '¦', '‖' ]
'`' : [ '`', ‵, ‶, ‷, ′, ″, ‴, ⁗ ]
'~' : [ '~', ~, ˜, ˷, ⸯ, ≈, ≋, ≃, ≅, ≇, ∽, ⋍, ≌, ﹏, ﹋, ﹌ ]
'|': {commit: '|'}
'`': ['`', '·', '・']
'~': {commit: '~'}
'!' : { commit: ! }
'@' : [ '@', ©, ®, ℗ ]
'#' : [ '#', № ]
'@': {commit: '@'}
'#': {commit: '#'}
'%' : [ '%', %, '°', '℃', ‰, ‱, ℉, ℅, ℆, ℀, ℁, ⅍ ]
'$' : [ ¥, '$', '€', '£', '¥', '¢', '¤', ₩ ]
'^' : { commit: …… }
'&' : '&'
'*' : [ '*', *, ·, ・, ×, ※, ❂, ⁂, ☮, ☯, ☣ ]
'*': {commit: '*'}
'(' : (
')' : )
'-' : '-'
'_' : ——
'+' : '+'
'=' : [ '=', 々, 〃 ]
'[' : [ 「, 【, 〔, [ ]
']' : [ 」, 】, 〕, ] ]
'{' : [ 『, 〖, { ]
'}' : [ 』, 〗, } ]
'=': {commit: '='}
'[': {commit: '【'}
']': {commit: '】'}
'{': ['「', '『', '〖', '{']
'}': ['」', '』', '〗', '}']
symbols:
'/cry': ['😂', '🌚', '😅']
'/yy': ['_(:з」∠)_', '∑(๑º口º๑)!!']
#符號、電腦
'/fh': [ ©, ®, ℗, ℠, ™, ℡, ℻, ☇, ☈, ☉, ☊, ☋, ☌, ☍, ☎, ☏, ☐, ☑, ☒, ☓, ☕, ☖, ☗, ⛉, ⛊, ☘, ☙, ☚, ☛, ☜, ☝, ☞, ☟, ☠, ☡, ☢, ☣, ☤, ☥, ☦, ☧, ☨, ☩, ☪, ☫, ☬, ☭, ☮, ☯, ☸, ♨, ♰, ♱, ♲, ♳, ♴, ♵, ♶, ♷, ♸, ♹, ♺, ♻, ♼, ♽, ♾, ♿, ⚆, ⚇, ⚈, ⚉, ⚐, ⚑, ⚒, ⚓, ⚔, ⚕, ⚖, ⚗, ⚘, ⚙, ⚚, ⚛, ⚜, ⚝, ⚞, ⚟, ⚠, ⚡, ⚰, ⚱, ⚲, ⚳, ⚴, ⚵, ⚶, ⚷, ⚸, ⚹, ⚺, ⚻, ⚼, ⚽, ⚾, ⚿, ⛀, ⛁, ⛂, ⛃, ⛋, ⛌, ⛍, ⛎, ⛏, ⛐, ⛑, ⛒, ⛓, ⛔, ⛕, ⛖, ⛗, ⛘, ⛙, ⛚, ⛛, ⛜, ⛝, ⛞, ⛟, ⛠, ⛡, ⛢, ⛣, ⛨, ⛩, ⛪, ⛫, ⛬, ⛭, ⛮, ⛯, ⛰, ⛱, ⛲, ⛳, ⛴, ⛵, ⛶, ⛷, ⛸, ⛹, ⛺, ⛻, ⛼, ⛽, ⛾, ⛿ ]
'/dn': &computer [ , ❖, ⌘, ⌃, ⌥, ⎇, ⇧, ⇪, ␣, ⇥, ⇤, ↩, ⌅, ⌤, ⌫, ⌦, ⌧, ⎋, ⌨, ◁, ⌀, ⌖, ⌗, ⏏, ↖, ↘, ⇞, ⇟, ⌚, ⏰, ⏱, ⏲, ⏳, ⌛, ⌜, ⌝⌞⌟, ⍑, ⏩, ⏪, ⏫, ⏬, ⏭, ⏮, ⏯ ]
Expand All @@ -90,7 +92,7 @@ punctuator:
#天氣
'/tq': [ ☀, ☁, ⛅, ⛈, ⛆, ☂, ☔, ☃, ⛄, ⛇ ]
#音樂
'/yy': [ 𝄞, ♩, ♪, ♫, ♬, ♭, ♮, ♯ ]
'/yinyue': [ 𝄞, ♩, ♪, ♫, ♬, ♭, ♮, ♯ ]
#兩性
'/lx': [ ♂, ♀, ⚢, ⚣, ⚤, ⚥, ⚦, ⚧, ⚨, ⚩, ⚪, ⚫, ⚬, ⚭, ⚮, ⚯ ]
#八卦、八卦名、六十四卦、六十四卦名、太玄經
Expand Down
39 changes: 7 additions & 32 deletions Rime/luna_pinyin_simp.custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,14 @@ patch:
# 载入自定义词库表
"translator/dictionary": oott123_personal

"recognizer/patterns/punct": "^/[a-z]*$"
punctuator:
import_preset: "luna_pinyin.extended/symbols"
symbols:
'/cry': ['😂', '🌚', '😅']
'/yy': ['_(:з」∠)_', '∑(๑º口º๑)!!']
half_shape:
'{': ['「', '『', '〖', '{']
'}': ['」', '』', '〗', '}']
'[': {commit: '【'}
']': {commit: '】'}
'`': ['`', '·', '・']
# 去掉一些常用符号的列表
'#': {commit: '#'}
'*': {commit: '*'}
'=': {commit: '='}
'/': {commit: '/'}
'~': {commit: '~'}
'@': {commit: '@'}
'|': {commit: '|'}


# 反查(笔画和表情)输入依赖
"schema/dependencies":
- stroke
- emoji
"recognizer/patterns/reverse_lookup": "u(b|e)[a-z]*'?$"

# 笔画输入
Expand All @@ -54,27 +41,15 @@ patch:
suffix: "'"
tips: '「表情」'

#"engine/translators/@after 3": table_translator@emoji_translator
#emoji_translator:
# dictionary: emoji
# enable_completion: false
# 通过 opencc 触发的中文字符表情输入;需要 plum 包
__include: emoji_suggestion:/patch

# 模糊音: en[g] in[g] z[h]
"speller/algebra/@after 1": derive/([ei])n$/$1ng/
"speller/algebra/@after 2": derive/([ei])ng$/$1n/
# "speller/algebra/@after 3": derive/^([z])h/$1/
# "speller/algebra/@after 4": derive/^([z])([^h])/$1h$2/

## 明月拼音扩充词库设置 ##
# via <https://github.com/zer4tul/RIME-Extend-Dict/blob/master/luna_pinyin.custom.yaml>
# 載入朙月拼音擴充詞庫
# "translator/dictionary": luna_pinyin.extended

# 改寫拼寫運算,使得含西文的詞彙(位於 luna_pinyin.cn_en.dict.yaml 中)不影響簡拼功能(注意,此功能只適用於朙月拼音系列方案,不適用於各類雙拼方案)
# 本條補靪只在「小狼毫 0.9.30」、「鼠鬚管 0.9.25 」、「Rime-1.2」及更高的版本中起作用。
"speller/algebra/@before 0": xform/^([b-df-hj-np-tv-z])$/$1_/

# 引入 symbols.yaml 文件,開啓輸入特殊符號功能,如有需求,取消註釋並重新部署即可。在Rime自帶的symbols.yaml的基礎上增加了少量內容。
# 可輸入的具體內容參考symbols.yaml
# "punctuator/import_preset": "luna_pinyin.extended/symbols"
"recognizer/patterns/punct": "^/[a-z]*$"
8 changes: 8 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash

# install packages
./plum/rime-install luna-pinyin
./plum/rime-install essay
./plum/rime-install stroke
./plum/rime-install rime/rime-emoji@schema
./plum/rime-install rime/rime-emoji@master

# linking rime config files
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ln -s $1 $DIR/Rime/* ~/Library/Rime

0 comments on commit bf56048

Please sign in to comment.