Skip to content

Instantly share code, notes, and snippets.

@hotoo
Created January 1, 2014 05:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hotoo/8205397 to your computer and use it in GitHub Desktop.
Save hotoo/8205397 to your computer and use it in GitHub Desktop.
自动关闭、启用 MacVim 输入法,不完美。 另外如果有使用 acp.vim 插件,这个插件也有一些中文输入问题。
set imdisable
set imactivatekey=D-space
set imsearch=0
set imcmdline=0
autocmd! InsertLeave * set imdisable|set iminsert=0
autocmd! InsertEnter * set noimdisable|set iminsert=2
"inoremap <ESC> <ESC>:set iminsert=0<CR>
@coocon
Copy link

coocon commented Mar 1, 2014

autocmd! CompleteDone * set imdisable|set iminsert=0 "for macvim

配置信息针对macvim,可以支持 非输入法模式下自动切换成英文

@xcodebuild
Copy link

我写了个小工具解决这个问题,自觉比较完美。
https://github.com/CodeFalling/fcitx-remote-for-osx

可以参见这篇文章:http://codefalling.com/2015/11/02/fcitx-vim-for-OS-X/

@haolly
Copy link

haolly commented Aug 13, 2016

这个需要vim在编译的时候开启 multi_byte_ime支持, 默认是没有开启的。。。。
所以Windows下可以用第三方编译的,例如这里https://tuxproject.de/projects/vim/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment