中州韵输入法 linux 小鹤双拼,「Rime 鼠须管」小鹤双拼配置指南

简单总结一下为什么要使用鼠须管:一是安全,不会出现什么输入法读取你个人信息更甚者是密码发送到服务器,也不知道他们用来机器学习什么;二是配置全平台同步,解决多台设备的输入法配置问题;三是快,不会出现输入法跟不上我的打字速度而导致思路中断的情况。

安装

对于 MacOS 来说,最简单的方式莫过于在终端中输入 brew cask install squirrel 安装软件本体。如何你想使用 rime/plum: 東風破可以在终端中输入 curl -fsSL https://git.io/rime-install | bash -s — :preset double-pinyin 。其中 preset double-pinyin 指定下载时默认包括小鹤双拼输入方案。

配置

Rime 的配置文件默认放在 ~/Library/Rime,而且是一种扩展 yaml 文件。默认的文件名为 .schema.yaml,比如小鹤双拼相关的默认配置在 double_pinyin_flpy.schema.yaml 中。如果我们自己想添加一些设置,推荐写在以.custom.yaml 结尾的新文件中,比如 double_pinyin_flypy.custom.yaml

default.custom.yaml

这个文件写一些全局的配置。

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30patch:

switcher:

caption: 〔方案选单〕

hotkeys: Control+grave

# 候选词数量

menu:

page_size: 9

# 使用的输入方案

schema_list:

– schema: luna_pinyin_simp

– schema: luna_pinyin

– schema: double_pinyin_flypy

# 输入法中英文状态快捷键

ascii_composer/switch_key:

Caps_Lock: commit_code

Control_L: noop

Control_R: noop

# 按下左 shift 英文字符直接上屏,不需要再次回车,输入法保持英文状态

Shift_L: noop

Shift_R: noop

# 在一些软件中默认使用英文输入状态

app_options:

com.apple.finder: &a

ascii_mode: true

no_inline: true

com.googlecode.iterm2: *a

com.alfredapp.Alfred: *a

com.runningwithcrayons.Alfred-2: *a

org.vim.MacVim: *a

com.apple.Terminal: *a

installation.yaml

配置文件多平台同步相关文件,sync_dir 指定同步文件夹的位置,配合例如坚果云之类的软件实现备份同步。

1

2

3

4

5

6

7

8distribution_code_name: Squirrel

distribution_name: “鼠鬚管”

distribution_version: 0.11.0

install_time: “Sun Dec 23 23:42:01 2018”

installation_id: “mac_didi”

sync_dir: “/Users/didi/Documents/rime_sync”

rime_version: 1.4.0

update_time: “Mon Jun 3 07:18:30 2019”

从 自由输入法RIME简明配置指南 – 少数派 中了解到,rime 个人词典双向同步,用户配置单向同步。另外需要把配置文件上传到 git 中,方便不同设备使用。

double_pinyin_flypy.custom.yaml

小鹤双拼相关的自用配置

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49patch:

# 引用 `symbols.custom` 文件里面的符

# ‘punctuator/import_preset’: symbols.custom

‘recognizer/patterns/punct’: “^/([a-z]+|[0-9])$”

# 載入朙月拼音擴充詞庫

“translator/dictionary”: ryen

# 更改‘西文’为‘英文’,‘增广’为‘扩展集’

punctuator:

import_preset: symbols.custom

half_shape:

“#”: “#”

“`”: “`”

“~”: “~”

“@”: “@”

“=”: “=”

“/”: [“/”, “÷”]

”: [“、”, ”]

“‘”: {pair: [“「”, “」”]}

“[“: [“【”, “[“]

“]”: [“】”, “]”]

“$”: [“¥”, “$”, “€”, “£”, “¢”, “¤”]

“>”: [“》”, “〉”, “?”, “>”]

switches:

– name: ascii_mode

reset: 0

states: [“中文”, “英文”]

– name: full_shape

states: [“半角”, “全角”]

– name: zh_simp

reset: 1

states: [“漢字”,”汉字”]

– name: ascii_punct

states: [“,。”, “,.”]

– name: extended_charset #生僻字开关

states: [“通用”, “扩展集”]

– name: show_emoji # 该项为表情输入,具体内容可见下文中 [关于表情输入] 部分

reset: 1

states: [ “????uFE0E”, “????uFE0F” ]

# 输入双拼码的时候不转化为全拼码

translator/preedit_format: {}

simplifier:

option_name: zh_simp

# 分 上屏二候选词;引 上屏三候选词

“key_binder/bindings”:

– { when: has_menu, accept: semicolon, send: 2 }

– { when: has_menu, accept: apostrophe, send: 3 }

– { when: paging, accept: bracketleft, send: Page_Up }

– { when: has_menu, accept: bracketright, send: Page_Down }

squirrel.custom.yaml

自定义皮肤相关文件

1

2

3

4

5

6

7

8

9

10

11patch:

style:

color_scheme: psionics

horizontal: true

inline_preedit: true

candidate_format: “%cu2005%@ u2005” # 用 1/6 em 空格 U+2005 来控制编 %c 和候选词 %@ 前后的空间。

font_point: 16 # 候选文字大小

label_font_point: 14 # 候选编 大小

corner_radius: 5 # 候选条圆角

border_height: 0 # 窗口边界高度,大于圆角半径才生效

border_width: 0 # 窗口边界宽度,大于圆角半径才生效

调试

文件格式类似于下面:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18Log file created at: 2019/06/07 23:31:54

Running on machine: didideMiBook-Pro.local

Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg

W0607 23:31:54.549346 162086912 config_compiler.cc:391] inaccessible node: punctuation.custom:/patch

W0607 23:31:54.554167 162086912 config_compiler.cc:391] inaccessible node: key_bindings.custom:/patch

W0607 23:31:54.560144 162086912 deployment_tasks.cc:179] schema list not defined.

W0607 23:36:13.133517 161013760 config_compiler.cc:391] inaccessible node: punctuation.custom:/patch

W0607 23:36:13.135843 161013760 config_compiler.cc:391] inaccessible node: key_bindings.custom:/patch

W0607 23:36:13.149406 161013760 config_data.cc:62] nonexistent config file ‘/Users/didi/Library/Rime/luna_pinyin_simp.custom.yaml’.

W0607 23:36:13.154920 161013760 config_compiler.cc:391] inaccessible node: punctuation.custom:/patch

W0607 23:36:13.156643 161013760 config_compiler.cc:391] inaccessible node: key_bindings.custom:/patch

W0607 23:36:13.331344 161013760 config_compiler.cc:391] inaccessible node: key_bindings.custom:/patch

W0607 23:36:13.333066 161013760 config_compiler.cc:391] inaccessible node: punctuation.custom:/patch

W0607 23:36:13.668072 161013760 config_data.cc:62] nonexistent config file ‘/Users/didi/Library/Rime/stroke.custom.yaml’.

W0607 23:36:13.670761 161013760 config_compiler.cc:391] inaccessible node: key_bindings.custom:/patch

W0607 23:36:13.672724 161013760 config_compiler.cc:391] inaccessible node: punctuation.custom:/patch

W0607 23:36:14.281919 161013760 config_compiler.cc:391] inaccessible node: punctuation.custom:/patch

W0607 23:36:14.283246 161013760 config_compiler.cc:391] inaccessible node: key_bindings.custom:/patch

按右 shift 切换输入法

1

2

3

4

5

6

7

8patch:

ascii_composer/good_old_caps_lock: true

ascii_composer/switch_key:

Caps_Lock: commit_code

Shift_L: noop

Shift_R: commit_code

Control_L: commit_code

Control_R: commit_code

Reference

文章知识点与官方知识档案匹配,可进一步学习相关知识CS入门技能树Linux入门初识Linux25388 人正在系统学习中 相关资源:韵母字典(韵母查询软件)V1.0.2免费安装版-其它代码类资源-CSDN文库

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年4月10日
下一篇 2021年4月10日

相关推荐