keep and restore fcitx state when leaving/re-entering insert mode https://www.vim.org/scripts/script.php?script_id=3764
Find a file
2020-12-22 01:02:43 +08:00
plugin reconnect dbus on error (maybe fcitx5 just was restarted) 2020-12-22 01:02:43 +08:00
README.md README: fix lists being combined as one 2020-12-21 19:46:15 +08:00

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.

Requires:

  • fcitx 5
  • Vim with Python 3 compiled in
  • The python-dbus package

Links:

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.

在离开或重新进入插入模式时自动记录和恢复每个缓冲区各自的输入法状态,以便在普通模式下始终是英文输入模式,切换回插入模式时恢复离开前的输入法输入模式。

要求:

  • fcitx 5
  • 带有 Python 3 支持的 Vim
  • python-dbus 包

链接:

注意事项:

  1. 终端下请设置 Vim 'ttimeoutlen' 选项为较小值如100否则退出插入模式时会有较严重的延迟。同样会造成延迟的还有 screen 的 maptimeout 选项以及 tmux 的 escape-time 选项。