项目作者: laishulu

项目描述 :
Switch input source automatically in vim for macos.
高级语言: Vim script
项目地址: git://github.com/laishulu/vim-macos-ime.git
创建时间: 2014-10-26T07:04:00Z
项目社区:https://github.com/laishulu/vim-macos-ime

开源协议:

下载


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

  1. brew tap laishulu/homebrew
  2. brew install macism

Install vim-macos-ime

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

Usage

change default Input Method of Insert Mode

  1. " Plugin default Input Method: 搜狗拼音输入法
  2. let g:macosime_cjk_ime = 'com.sogou.inputmethod.sogou.pinyin'
  3. " 简体拼音
  4. let g:macosime_cjk_ime = 'com.apple.inputmethod.SCIM.ITABC'
  5. " 简体双拼
  6. let g:macosime_cjk_ime = 'com.apple.inputmethod.SCIM.Shuangpin'
  7. " 简体五笔
  8. let g:macosime_cjk_ime = 'com.apple.inputmethod.SCIM.WBX'
  9. " 鼠须管
  10. let g:macosime_cjk_ime = 'im.rime.inputmethod.Squirrel.Rime'