Merge pull request #20 from ouuan/fcitx5

feat: support search mode
This commit is contained in:
依云 2021-04-18 16:36:27 +08:00 committed by GitHub
commit 07b608571d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,4 @@
Keep and restore fcitx state for each buffer separately when leaving/re-entering insert mode. Like always typing English in normal mode, but Chinese in insert mode.
Keep and restore fcitx state for each buffer separately when leaving/re-entering insert mode or search mode. Like always typing English in normal mode, but Chinese in insert mode.
D-Bus only works with the same user so this won't work with `sudo vim`. See the `fcitx5-server` branch for an experimental implementation that supports `sudo vim`.
@ -17,7 +17,7 @@ Warning:
1. If you use Vim in terminal, to avoid the Esc delay, please set `'ttimeoutlen'` to 100 or some other value. And check screen's `maptimeout` or tmux's `escape-time` option if you use it too.
在离开或重新进入插入模式时自动记录和恢复每个缓冲区各自的输入法状态,以便在普通模式下始终是英文输入模式,切换回插入模式时恢复离开前的输入法输入模式。
在离开或重新进入插入模式或搜索模式时自动记录和恢复每个缓冲区各自的输入法状态,以便在普通模式下始终是英文输入模式,切换回插入模式时恢复离开前的输入法输入模式。
D-Bus 只在同一用户时有效,所以使用 `sudo vim` 时本代码就失效了。在 `fcitx5-server` 分支有一个实验性的版本支持 `sudo vim` 的用法。

View file

@ -21,6 +21,8 @@ try " abort on fail
au InsertLeave * py3 fcitx2en()
endif
au InsertEnter * py3 fcitx2zh()
au CmdlineEnter / py3 fcitx2zh()
au CmdlineLeave / py3 fcitx2en()
endif
endtry
" ---------------------------------------------------------------------