Switch input source automatically in vim for macos.
Switch input source automatically in vim for macos, modified from
vim-osx-ime, but use
macism to switch ime.
When vim switches to insert mode:
If the character before cursor is a Chinese character, switch to Chinese
IME and put it in Chinese mode.
If the character before cursor is an English character, switch to Chinese
IME and put it in English mode.
Switch English IME whenever vim switchs to normal mode.
macism
brew tap laishulu/homebrew
brew install macism
vim-macos-ime
NeoBundle
, then add the following codes in your .vimrc
.
NeoBundle 'laishulu/vim-macos-ime'
Dein
, then add the following codes in you .toml
file
[[plugins]]
repo = 'laishulu/vim-macos-ime'
change default Input Method of Insert Mode
" Plugin default Input Method: 搜狗拼音输入法
let g:macosime_cjk_ime = 'com.sogou.inputmethod.sogou.pinyin'
" 简体拼音
let g:macosime_cjk_ime = 'com.apple.inputmethod.SCIM.ITABC'
" 简体双拼
let g:macosime_cjk_ime = 'com.apple.inputmethod.SCIM.Shuangpin'
" 简体五笔
let g:macosime_cjk_ime = 'com.apple.inputmethod.SCIM.WBX'
" 鼠须管
let g:macosime_cjk_ime = 'im.rime.inputmethod.Squirrel.Rime'