Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lotem
Created April 8, 2012 03:44
Show Gist options
  • Star 36 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save lotem/2334409 to your computer and use it in GitHub Desktop.
Save lotem/2334409 to your computer and use it in GitHub Desktop.
Rime 別樣設定,使用西文標點、[ ] 鍵換頁
# Rime alternative settings
# encoding: utf-8
#
# 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
config_version: "0.3"
punctuator:
full_shape:
" " : { commit: " " }
"," : { commit: , }
"." : { commit: 。 }
"<" : [ 《, 〈, «, ‹ ]
">" : [ 》, 〉, », › ]
"/" : [ 、, /, "/", ÷ ]
"?" : { commit: ? }
";" : { commit: ; }
":" : :
"'" : { pair: [ "‘", "’" ] }
"\"" : { pair: [ "“", "”" ] }
"\\" : [ 、, \, "\\" ]
"|" : [ ・, |, "|", "§", "¦" ]
"`" : [ `, "`" ]
"~" : [ 〜, "~", ~, 〰 ]
"!" : { commit: ! }
"@" : [ @, "@", ☯ ]
"#" : [ #, "#", ⌘ ]
"%" : [ %, "%", "°", "℃" ]
"$" : [ ¥, "$", "€", "£", "¥", "¢", "¤" ]
"^" : { commit: …… }
"&" : [ &, "&" ]
"*" : [ *, "*", ・, ×, ※, ❂, · ]
"(" : (
")" : )
"-" : [ -, "-" ]
"_" : ——
"+" : [ +, "+" ]
"=" : [ =, "=" ]
"[" : [ 「, 【, 〔, [ ]
"]" : [ 」, 】, 〕, ] ]
"{" : [ 『, 〖, { ]
"}" : [ 』, 〗, } ]
half_shape:
"," : { 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 }
@Puriney
Copy link

Puriney commented Feb 2, 2015

@xTaiChi 建议你把版本号改一下 config_version: "0.3" 改成你现在正在用的即可。

@hikoship
Copy link

请问加 commit 和不加有什么区别?

@WesleyBlancoYuan
Copy link

我认为大概是commit是直接上字不用选吧。毕竟不用commit的都是多个符号,用的都是单个

@wacmx
Copy link

wacmx commented Nov 18, 2017

这个文件添加了,配置文件xxx.custom.yaml也加了patch了,没有生效,中文状态还是中文标点。版本号改成和default一样也是不行。

@chokees
Copy link

chokees commented Jan 17, 2018

试了好久,我的可以了
下载后把这个文件放到自己的配置文件里,就是有default.custom.yaml这个文件的目录里
然后在你自己选择的输入法配置文件
比如我是五笔wubi_pinyin.schema.yaml
这个文件里面替换default为alternative就可以了
punctuator:
import_preset: default
key_binder:
import_preset: default

punctuator:
import_preset: alternative
key_binder:
import_preset: alternative

最后,最重要一点就是,程序安装目录里找到 小狼毫輸入法,点击【小狼毫】重新部署 这个命令
才能生效,看到效果

Copy link

ghost commented Apr 1, 2018

不能用的可能原因之一:

patch:
  "menu/page_size": 6
  punctuator:
    import_preset: alternative

不能是

patch:
  "menu/page_size": 6
punctuator:
  import_preset: alternative

punctuaor是patch的子结构,要缩进(两个空格)

@secret08
Copy link

secret08 commented Apr 7, 2018

好像我是直接用 ctrl + ` 就可以换成全体英文符号了.

@chs513
Copy link

chs513 commented Jul 17, 2018

我希望达到的效果是: 1. 默认情况下, 中文输入法用的是英文标点. 2. 可以用某个快捷键随时在英文标点和中文标点之间切换, 以满足不时之需.

第 1 个问题已经解决了, 第 2 个怎么解决呢? 求解

@fengbo123
Copy link

这个配置都是8年以前的配置了,确定不要更新一下吗

@GJRobert
Copy link

这个配置都是8年以前的配置了,确定不要更新一下吗

看來沒什麼問題啊。

@rosyzc7
Copy link

rosyzc7 commented Apr 22, 2020

改了版本号好像还是不行啊。。。 还是中文符号

@lotem
Copy link
Author

lotem commented Apr 23, 2020

今天是2020年。Rime可以通过方案选单切换中西文标点符号。这份配置已经不需要用了。[ ] 鍵換頁的配置可供参考。

@JawilX
Copy link

JawilX commented Apr 26, 2020

使用这份配置没效果,我在luna_pinyin.custom.yaml的switches - name: ascii_punct - reset: 1 states: [ 。,, ., ],这样的标点是。,而不是我想要的., 请问该怎么设置呢

@wu-sky
Copy link

wu-sky commented Apr 28, 2021

ctrl + ` 只能临时使用, 不能长久生效的;

@hellodk34
Copy link

2021年了,直接使用方案选单中的「,。-> , . 」 功能即可

20210604141639.png

个人测试通过,本条消息中的西文标点就是这样打出来的.

@WhisperWindE
Copy link

2021年了,直接使用方案选单中的「,。-> , . 」 功能即可

20210604141639.png

个人测试通过,本条消息中的西文标点就是这样打出来的.

2022年了, 这个问题还是不好解决呀。用这个菜单, 切换一个窗口又要打开菜单。好烦人。

@saneryin
Copy link

2023.10月了, 我安装的是weasel,版本是0.15.0.0 按上面的方法。
保存alternative.yaml文件到c:/user/...下面。
修改wubi_pinyin.schema.yaml
修改版本0.3为0.15.0.0
点击“重新部署”。
没用。

我的文件中没有
patch这个字样, 因此下一行punctuator就没有缩两格的必要。
我的安装的输入法中也没有“方案选单”这个东西。
000069

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