Fix types and wording

This commit is contained in:
oxalica 2021-08-20 16:06:01 +08:00
parent bcdbcec7b1
commit bd6fc8c091
No known key found for this signature in database
GPG key ID: CED392DE0C483D00
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ D-Bus only works with the same user so this won't work with `sudo vim`. See the
By default, it use python3 and D-Bus to toggle IME state.
If you set `g:fcitx5_remote` to the executable path of `fcitx5-remote` **BEFORE** loading the plugin, it will use `fcitx5-remote` instead of python and D-Bus. In this case, python3 support is optional.
Usually `fcitx5-remote` mode is way faster since python script need 400ms+ for the initial load.
Usually `fcitx5-remote` mode is way faster since Python script need quite some time for the initial load if you don't use any other plugins that load Python.
Base requirements:
@ -36,7 +36,7 @@ D-Bus 只在同一用户时有效,所以使用 `sudo vim` 时本代码就失
本插件默认会使用 Python 3 并通过 D-Bus 来切换输入法状态。
但如果你在加载插件**之前**设置了 `g:fcitx5_remote` 为你已安装的 `fcitx5-remote` 可执行文件的路径,那么本插件会使用它来切换输入法状态;此模式下本插件并不需要 Python 。
通常 Python 模式首次加载很慢,需要 400ms+ ,而 `fcitx5-remote` 模式则不会拖慢启动时间
如果你没有其他使用 Python 的 Vim 插件,本插件的 Python 模式初始化可能会显著拖慢启动时间;而 `fcitx5-remote` 模式则没有这个问题
基本要求:

View file

@ -14,8 +14,8 @@ set cpo&vim
" If g:fcitx5_remote is set (to the path to `fcitx5-remove`), use it to toggle IME state.
if exists("g:fcitx5_remote")
function Fcitx2en()
let inputstatus = system(g:fcitx5_remote)
if inputstatus == 2
let inputstatus = trim(system(g:fcitx5_remote))
if inputstatus == '2'
let b:inputtoggle = 1
call system(g:fcitx5_remote . ' -c')
endif