ybian / smartim

A Vim plugin to make it stand well with input methods (Mac only)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

用中文输入(搜狗),然后按esc,大概有1到2秒的延时,才切换到英文输入法,这个有没有改进的空间

lilongthinker opened this issue · comments

使用的两个输入法的id
com.apple.keylayout.ABC
com.sogou.inputmethod.sogou.pinyin

单独执行im-select命令还是很快的

@lilongthinker 能不能更新到最新版试试?如果还有问题,可以尝试以下步骤:

  1. 用vim --cmd 'let g:smartim_debug=1'启动vim
  2. 进入插入模式,切换输入法,离开插入模式;再次进入插入模式,离开插入模式;退出vim
  3. 应该生成了一个文件~/vim_smartim_debug_output,把这个文件的内容贴到这里。

谢谢!

更新到最新的版本后,如上操作打印日志如下

[2017-03-31_09:06:19] - Debug Start
[2017-03-31_09:06:19] g:smartim_loaded = 1
[2017-03-31_09:06:19] g:smartim_default = com.apple.keylayout.ABC
[2017-03-31_09:06:19] g:smartim_disable = 0
[2017-03-31_09:06:19] g:smartim_debug = 1
[2017-03-31_09:06:19] s:imselect_path = /Users/lilong/.vim/bundle/smartim/plugin/im-select
[2017-03-31_09:06:24] >>> Smartim_SelectSaved
[2017-03-31_09:06:24] <<< Smartim_SelectSaved returned
[2017-03-31_09:06:33] >>> Smartim_SelectDefault
[2017-03-31_09:06:34] b:saved_im = com.sogou.inputmethod.sogou.pinyin^@
[2017-03-31_09:06:34] <<< Smartim_SelectDefault returned 0
[2017-03-31_09:06:39] >>> Smartim_SelectSaved
[2017-03-31_09:06:39] b:saved_im = com.sogou.inputmethod.sogou.pinyin^@
[2017-03-31_09:06:39] <<< Smartim_SelectSaved returned 0
[2017-03-31_09:06:52] >>> Smartim_SelectDefault
[2017-03-31_09:06:52] b:saved_im = com.sogou.inputmethod.sogou.pinyin^@
[2017-03-31_09:06:52] <<< Smartim_SelectDefault returned 0
[2017-03-31_09:06:56] >>> Smartim_SelectDefault
[2017-03-31_09:06:56] b:saved_im = com.apple.keylayout.ABC^@
[2017-03-31_09:06:56] <<< Smartim_SelectDefault returned 0

从 log 看是正常的啊,我自己尝试装了sogou输入法,并且也用了ABC,但是还是不能复现你说的问题。你试试把这个插件disable(let g:smartim_disable = 1)还有这个问题吗?把插件删掉还有这个问题吗?

如果确定是这个插件的问题,在这个插件启用的情况下,如果不用esc键离开插入模式,有这个问题吗?比如,在我的配置中,我用连续两个;映射到esc,你把下面一段加到你的.vimrc然后用;;离开插入模式,还有这个问题吗?

"map ;; to <ESC>
map ;; <ESC>
imap ;; <ESC>
cmap ;; <C-U><ESC>
"take care chinese input
map ;; <ESC>
imap ;; <ESC>
cmap ;; <C-U><ESC>

多谢你的反馈。

大概当时是别的插件的问题,后来我重新安装了下vim,现在很快了,谢谢

大概当时是别的插件的问题,后来我重新安装了下vim,现在很快了,谢谢

我现在也是mac 用的搜狗输入法,com.sogou.inputmethod.sogou.pinyin
想知道怎么配置这个插件才能生效,目前 vimrc 里设置了let g:smartim_default = 'com.sogou.inputmethod.sogou.pinyin',还需要其他的吗,似乎现在是没有效果不能切换模式自动切换.

从 log 看是正常的啊,我自己尝试装了sogou输入法,并且也用了ABC,但是还是不能复现你说的问题。你试试把这个插件disable(let g:smartim_disable = 1)还有这个问题吗?把插件删掉还有这个问题吗?

如果确定是这个插件的问题,在这个插件启用的情况下,如果不用esc键离开插入模式,有这个问题吗?比如,在我的配置中,我用连续两个;映射到esc,你把下面一段加到你的.vimrc然后用;;离开插入模式,还有这个问题吗?

"map ;; to <ESC>
map ;; <ESC>
imap ;; <ESC>
cmap ;; <C-U><ESC>
"take care chinese input
map ;; <ESC>
imap ;; <ESC>
cmap ;; <C-U><ESC>

多谢你的反馈。

作者你好,我搜狗输入法具体目前如何使用这个插件呢