Skip to content

Instantly share code, notes, and snippets.

@sgur
Last active August 29, 2015 14:05
Show Gist options
  • Save sgur/bf1bcedd0a41870f8159 to your computer and use it in GitHub Desktop.
Save sgur/bf1bcedd0a41870f8159 to your computer and use it in GitHub Desktop.
Vimからfcitxの制御をする簡単な設定
set iminsert=2
set imsearch=2
set imcmdline
set imactivatefunc=ImActivate
function! ImActivate(active)
if a:active
call system('fcitx-remote -o')
else
call system('fcitx-remote -c')
endif
endfunction
set imstatusfunc=ImStatus
function! ImStatus()
return system('fcitx-remote')[0] is# '2'
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment