Closed yuexiahu closed 4 years ago
diff --git a/plugin/im_select.vim b/plugin/im_select.vim index 0b8c522..baa46bc 100644 --- a/plugin/im_select.vim +++ b/plugin/im_select.vim @@ -59,6 +59,17 @@ if !exists('g:im_select_get_im_cmd') || !exists('g:ImSelectSetImCmd') if !exists('g:im_select_default') let g:im_select_default = '1' endif + elseif $GTK_IM_MODULE == 'fcitx5' || $QT_IM_MODULE == 'fcitx5' + let g:im_select_get_im_cmd = ['fcitx5-remote'] + let g:ImSelectSetImCmd = { + \ key -> + \ key == 1 ? ['fcitx5-remote', '-c'] : + \ key == 2 ? ['fcitx5-remote', '-o'] : + \ execute("throw 'invalid im key'") + \ } + if !exists('g:im_select_default') + let g:im_select_default = '1' + endif elseif match($XDG_CURRENT_DESKTOP, '\cgnome') >= 0 if $GTK_IM_MODULE == 'ibus' let g:im_select_get_im_cmd = [ @@ -98,6 +109,17 @@ if !exists('g:im_select_get_im_cmd') || !exists('g:ImSelectSetImCmd') if !exists('g:im_select_default') let g:im_select_default = '1' endif + elseif $GTK_IM_MODULE == 'fcitx5' || $QT_IM_MODULE == 'fcitx5' + let g:im_select_get_im_cmd = ['fcitx5-remote'] + let g:ImSelectSetImCmd = { + \ key -> + \ key == 1 ? ['fcitx5-remote', '-c'] : + \ key == 2 ? ['fcitx5-remote', '-o'] : + \ execute("throw 'invalid im key'") + \ } + if !exists('g:im_select_default') + let g:im_select_default = '1' + endif endif endif endif
@yuexiahu Thank you. Merged in 544dde0.