mirror of
https://github.com/lilydjwg/fcitx.vim.git
synced 2025-12-27 02:24:57 +08:00
parent
dc95d0301b
commit
92247352c6
1 changed files with 11 additions and 2 deletions
|
|
@ -11,8 +11,7 @@ endif
|
|||
let s:keepcpo = &cpo
|
||||
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 s:setup_cmd()
|
||||
function Fcitx2en()
|
||||
let inputstatus = trim(system(g:fcitx5_remote))
|
||||
if inputstatus == '2'
|
||||
|
|
@ -32,6 +31,11 @@ if exists("g:fcitx5_remote")
|
|||
endfunction
|
||||
|
||||
let g:loaded_fcitx = 1
|
||||
endfunction
|
||||
|
||||
" If g:fcitx5_remote is set (to the path to `fcitx5-remove`), use it to toggle IME state.
|
||||
if exists("g:fcitx5_remote")
|
||||
call s:setup_cmd()
|
||||
|
||||
" Otherwise, if python3 is available, use python and dbus to toggle IME state.
|
||||
elseif has('python3')
|
||||
|
|
@ -50,6 +54,11 @@ elseif has('python3')
|
|||
|
||||
let g:loaded_fcitx = 1
|
||||
endif
|
||||
catch
|
||||
if executable('fcitx5-remote')
|
||||
let g:fcitx5_remote = 'fcitx5-remote'
|
||||
call s:setup_cmd()
|
||||
endif
|
||||
endtry
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue