
这是一个使用 Language Server 客户端作为前端的全拼中文输入方案,所以它是像输入代码一样输入中文,所以应该算是 vim 里面比较无痛的中文输入方案。
以 coc.nvim 为例 (也支持任何其它 LS Client )
安装 coc.nvim 插件
:CocInstall coc-ds-pinyin-lsp
或者通过 coc-settings.json 配置 language server 配置,具体看项目主页。
"ds-pinyin-lsp.completion_on": true,
"ds-pinyin-lsp.completion_around_mode": true,
"ds-pinyin-lsp.completion_trigger_characters": ">",
"ds-pinyin-lsp.show_symbols": true,
"ds-pinyin-lsp.show_symbols_only_follow_by_hanzi": true,
"ds-pinyin-lsp.show_symbols_by_n_times": 2,
"ds-pinyin-lsp.max_suggest": 50,
"ds-pinyin-lsp.match_as_same_as_input": false,
"ds-pinyin-lsp.match_long_input": true,
"ds-pinyin-lsp.status_bar_flag": "拼",
这个配置,一般情况下不会出现补全中文选项,只有光标出现在中文环绕(开头 /中间 /末尾)的情况会出现中文补全选项,或者在输入 > 字符(可以自己配置)后面会启用中文补全。避免中文补全扰乱代码补全。
1
basncy 2022 年 12 月 31 日
|
4
basncy 2022 年 12 月 31 日
木有苹果设备, 但是你可以研究一下. https://github.com/rime/squirrel
听说一套配置可以同时用在 windows, linux, android, ios, macos 上面. 至少我实现了非苹果设备全平台同步. |
5
yuuko OP @basncy 感谢分享,之前看错了,我以为你这个是不需要依赖 IME 的,我目前所烦的不是没有好用的输入法,而是 vim 下输入中文需要切换输入法的问题,因为时常切换不过来导致在 Normal 模式操作乱飞
|
6
Kobayashi 2022 年 12 月 31 日 via Android
还是没明白怎么回事,简介里能说得更明白点吗?
|
9
Dvel 2022 年 12 月 31 日
JetBrains 的 IdeaVim 有个插件( IdeaVimExtension )可以在回到普通模式的时候自动切回到英文输入法,不知道纯 Vim 有没有这样的插件。
|
12
starrycat 2022 年 12 月 31 日 via Android
有意思,可惜不支持双拼🥲
|
15
zbinlin 2022 年 12 月 31 日
这想法不错,最好录个 gif 来看下实际效果。
|
16
yuuko OP |
19
basncy 2023 年 1 月 1 日
|
20
thedrwu 2023 年 1 月 1 日 via Android
自用方案: https://lstu.fr/VVT6jFpL
|
21
ns09005264 2023 年 1 月 1 日
涨见识了,不错的思路。
|
22
jawilx 2023 年 1 月 1 日
rime 能配置各个软件的 vim_mode ,切到 normal 模式时会自动换成英文
|
23
zwlinc 2023 年 1 月 1 日
感觉很 Nice !
|
24
zagfai 2023 年 1 月 1 日
想要个粤语拼音:o
|
26
zhouzm 2023 年 1 月 3 日
这个厉害了,能支持别的输入法么,例如五笔。
|
27
wlh233 2023 年 1 月 12 日
受到 OP 的启发,我这两天写了一个包装 librime 的 LSP ,https://github.com/wlh320/rime-ls 目前 bug 还很多,用着跟智能 ABC 差不多哈哈
|
29
yuancoder 2023 年 1 月 19 日
自己写了一个脚本切换,用起来还可以。
|