Skip to content

Instantly share code, notes, and snippets.

@ricky9w
Created January 24, 2022 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricky9w/1865034b31dbc4af7ca2831a4e18b538 to your computer and use it in GitHub Desktop.
Save ricky9w/1865034b31dbc4af7ca2831a4e18b538 to your computer and use it in GitHub Desktop.
Use half-shape punctuator in Rime
# Rime alternative settings
# encoding: utf-8
#
# description:
#
# difference from default settings:
# 1. ascii-style punctuation in half-shape mode
# 2. [ ] as paging keys
#
# save this file as:
# (Linux) ~/.config/ibus/rime/alternative.yaml
# (Mac OS) ~/Library/Rime/alternative.yaml
# (Windows) "%APPDATA%\Rime\alternative.yaml"
#
# edit <SCHEMA_ID>.custom.yaml:
# >> patch:
# >> 'punctuator/import_preset': alternative
# >> 'key_binder/import_preset': alternative
#
# for detailed explanation, refer to:
# http://code.google.com/p/rimeime/wiki/CustomizationGuide#%E4%BD%BF%E7%94%A8%E5%85%A8%E5%A5%97%E8%A5%BF%E6%96%87%E6%A8%99%E9%BB%9E
#
# author: Richard Wang <ricky9wang@gmail.com>
#
# refer: https://gist.github.com/yxjxx/6230675
#
# change-log:
#
# change some punctuators back to full-shape version:
# (< -> 《), (> -> 》), (\ -> 、)
#
# release-date: 2022-01-24
config_version: "0.3.1"
punctuator:
full_shape:
" " : { commit: " " }
"," : { commit: , }
"." : { commit: 。 }
"<" : [ 《, 〈, «, ‹ ]
">" : [ 》, 〉, », › ]
"/" : [ 、, /, "/", ÷ ]
"?" : { commit: ? }
";" : { commit: ; }
":" : :
"'" : { pair: [ "‘", "’" ] }
"\"" : { pair: [ "“", "”" ] }
"\\" : [ 、, \, "\\" ]
"|" : [ ・, |, "|", "§", "¦" ]
"`" : [ `, "`" ]
"~" : [ 〜, "~", ~, 〰 ]
"!" : { commit: ! }
"@" : [ @, "@", ☯ ]
"#" : [ #, "#", ⌘ ]
"%" : [ %, "%", "°", "℃" ]
"$" : [ ¥, "$", "€", "£", "¥", "¢", "¤" ]
"^" : { commit: …… }
"&" : [ &, "&" ]
"*" : [ *, "*", ・, ×, ※, ❂, · ]
"(" : (
")" : )
"-" : [ -, "-" ]
"_" : ——
"+" : [ +, "+" ]
"=" : [ =, "=" ]
"[" : [ 「, 【, 〔, [ ]
"]" : [ 」, 】, 〕, ] ]
"{" : [ 『, 〖, { ]
"}" : [ 』, 〗, } ]
half_shape:
"," : { commit: "," }
"." : { commit: "." }
"<" : "《"
">" : "》"
"/" : "/"
"?" : { commit: "?" }
";" : { commit: ";" }
":" : { commit: ":" }
"'" : "'"
"\"" : "\\"
"\\" : "、"
"|" : "|"
"`" : { commit: "`" }
"~" : "~"
"!" : { commit: "!" }
"@" : "@"
"#" : "#"
"%" : "%"
"$" : "$"
"^" : "^"
"&" : "&"
"*" : "*"
"(" : "("
")" : ")"
"-" : "-"
"_" : "_"
"+" : "+"
"=" : "="
"[" : "["
"]" : "]"
"{" : "{"
"}" : "}"
key_binder:
bindings:
# commonly used paging keys
- { when: composing, accept: ISO_Left_Tab, send: Page_Up }
- { when: composing, accept: Shift+Tab, send: Page_Up }
- { when: composing, accept: Tab, send: Page_Down }
- { 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 }
- { when: paging, accept: bracketleft, send: Page_Up }
- { when: has_menu, accept: bracketright, send: Page_Down }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment