Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
입력모드에서 빠져나올 때 입력기를 자동으로 영어로 바꿈.
" auto reset input method
function! g:SetImeToEnglish()
let s:current_input_method = system("ibus engine")
if s:current_input_method !~ "xkb:us::eng"
let s:ret = system("ibus engine xkb:us::eng")
endif
endfunction
let s:ibus_version = system("ibus version")
if s:ibus_version =~ "IBus 1.5"
inoremap <silent> <esc> <esc><esc>:<c-u>call g:SetImeToEnglish()<cr>
inoremap <silent> <c-c> <esc><esc>:<c-u>call g:SetImeToEnglish()<cr>
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment