本帖最后由 ry-an 于 2020-3-13 11:52 编辑
希望在输www.的时候,小鹤会自动转成英文网址
所以去研究了以下rime……,步骤如下:
①新建mysymbols.yaml文件。
patch:
punctuator/import_preset: mysymbols
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: …… }
'&' : '&'
'*' : [ '*', *, ·, ・, ×, ※, ❂, ⁂, ☮, ☯, ☣ ]
'(' : (
')' : )
'-' : '-'
'_' : ——
'+' : '+'
'=' : [ '=', 々, 〃 ]
'[' : 【
']' : 】
'{' : [ 『, 〖, {, 「, 〔, [ ]
'}' : [ 』, 〗, }, 」, 〕, ] ]
②新建flypy.custom.yaml文件
patch:
__include: mysymbols:/patch
③打开flypy.schema.yaml文件,拖到下方找到key_binder。复制下面整段替换。
key_binder:
import_preset: default #方案切换相关
bindings:
- {accept: bracketleft, send: Page_Up, when: paging} # [上翻页
- {accept: bracketright, send: Page_Down, when: has_menu} # ]下翻页
- {accept: semicolon, send: 2, when: has_menu} #分号次选
#- {accept: Release+semicolon, send: semicolon, when: has_menu} #如要使用分号引导符号功能,并双击上屏分号,需注销此行
#- {accept: period, send: 2, when: has_menu} #句号次选,已用下面内容替代
- {accept: comma, send: comma, when: paging} #注销逗号翻页
- {accept: period, send: period, when: has_menu} #注销句号翻页
- {accept: dollar, send: 2, when: composing}
- {accept: Release+dollar, send: period, when: composing}
#- {accept: Release+period, send: period, when: composing}
#- {accept: comma, send: 2, when: has_menu} #逗号次选
- {accept: bar, send: 2, when: composing}
- {accept: Release+bar, send: comma, when: composing}
#- {accept: Release+comma, send: comma, when: composing}
- {accept: "Tab", send: Escape, when: composing}
- {accept: "Caps_Lock", send: Escape, when: composing}
- {accept: "Shift_R", send: Escape, when: composing}
- {accept: "Shift+space", toggle: full_shape, when: always} #切换全半角
- {accept: "Control+j", toggle: simplification, when: always} #切换简繁
- {accept: "Control+period", toggle: ascii_punct, when: always} #切换中英标点
- {accept: "Control+m", select: .next, when: always} #切换方案
|