Skip to content

laishulu/vim-macos-ime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

vim-macos-ime

Switch input source automatically in vim for macos, modified from vim-osx-ime, but use macism to switch ime.

Features

  • 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.

Install

Install macism

brew tap laishulu/homebrew
brew install macism

Install vim-macos-ime

  • If you use NeoBundle, then add the following codes in your .vimrc.
NeoBundle 'laishulu/vim-macos-ime'
  • If you use Dein, then add the following codes in you .toml file
[[plugins]]
repo = 'laishulu/vim-macos-ime'

Usage

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'

About

Switch input source automatically in vim for macos.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •