fcitx.vim

作者: beihaott | 来源:发表于2020-10-25 20:09 被阅读0次

let g:input_toggle = 0

function! Fcitx2en()

  let s:input_status = system("fcitx-remote")

  if s:input_status == 2

      let g:input_toggle = 1

      let l:a = system("fcitx-remote -c")

  endif

endfunction

function! Fcitx2zh()

  let s:input_status = system("fcitx-remote")

  if s:input_status != 2 && g:input_toggle == 1

      let l:a = system("fcitx-remote -o")

      let g:input_toggle = 0

  endif

endfunction

set timeoutlen=150

autocmd InsertLeave * call Fcitx2en()

autocmd InsertEnter * call Fcitx2zh()let g:input_toggle = 0

相关文章

  • fcitx.vim

    let g:input_toggle = 0 function! Fcitx2en() let s:input...

网友评论

      本文标题:fcitx.vim

      本文链接:https://www.haomeiwen.com/subject/sdzbpktx.html