使用python-mode时,YouCompleteMe会冻结

5
当我输入 self.时,弹出窗口会自动选择第一个选项,并且不管输入什么都不会改变。例如,会显示 match 1 of 52
使用 <Esc> 返回正常模式并再次进入插入模式后,YouCompleteMe 就可以正常工作了。它将显示 Back at Original 并自动更新不同的输入。
操作系统:Kubuntu 13.04
Vim 版本:7.4.5
可能相关的插件:ultisnips
日志:
~/vimConf  ± master   2014-02-12 16:37:37,251 - DEBUG - Global extra conf not loaded or no function YcmCorePreload
serving on localhost:

2014-02-12 16:37:38,931 - INFO - Received health request
2014-02-12 16:37:38,935 - INFO - Received event notification
2014-02-12 16:37:38,935 - DEBUG - Event name: BufferVisit
2014-02-12 16:37:39,012 - INFO - Received event notification
2014-02-12 16:37:39,013 - DEBUG - Event name: FileReadyToParse
2014-02-12 16:37:39,013 - INFO - Adding buffer identifiers for file: /home/kamel/vimConf/my_configs.vim

2014-02-12 16:37:39,086 - INFO - Received event notification
2014-02-12 16:37:39,087 - DEBUG - Event name: BufferVisit
2014-02-12 16:37:39,147 - INFO - Received event notification
2014-02-12 16:37:39,148 - DEBUG - Event name: BufferVisit
2014-02-12 16:37:39,149 - INFO - Received event notification
2014-02-12 16:37:39,150 - DEBUG - Event name: FileReadyToParse
2014-02-12 16:37:39,150 - INFO - Adding buffer identifiers for file: /home/kamel/vimConf/my_configs.vim

2014-02-12 16:37:50,482 - INFO - Received event notification
2014-02-12 16:37:50,483 - DEBUG - Event name: BufferVisit
2014-02-12 16:37:50,533 - INFO - Received event notification
2014-02-12 16:37:50,534 - DEBUG - Event name: BufferVisit
2014-02-12 16:37:50,545 - INFO - Received event notification
2014-02-12 16:37:50,545 - DEBUG - Event name: FileReadyToParse
2014-02-12 16:37:50,546 - INFO - Adding buffer identifiers for file: /home/kamel/labola/src/app/mixin/alert.py

2014-02-12 16:37:50,711 - INFO - Received event notification
2014-02-12 16:37:50,712 - DEBUG - Event name: BufferVisit
2014-02-12 16:37:50,748 - INFO - Received event notification
2014-02-12 16:37:50,749 - DEBUG - Event name: BufferVisit
2014-02-12 16:37:50,750 - INFO - Received event notification
2014-02-12 16:37:50,752 - DEBUG - Event name: FileReadyToParse
2014-02-12 16:37:50,752 - INFO - Adding buffer identifiers for file: /home/kamel/labola/src/app/mixin/alert.py

2014-02-12 16:37:57,893 - INFO - Received completion request
2014-02-12 16:37:57,894 - DEBUG - Using filetype completion: False
2014-02-12 16:37:58,055 - INFO - Received completion request
2014-02-12 16:37:58,056 - DEBUG - Using filetype completion: False
2014-02-12 16:37:58,184 - INFO - Received completion request
2014-02-12 16:37:58,184 - DEBUG - Using filetype completion: False
2014-02-12 16:37:58,297 - INFO - Received completion request
2014-02-12 16:37:58,298 - DEBUG - Using filetype completion: False
2014-02-12 16:39:37,853 - INFO - Received event notification
2014-02-12 16:39:37,853 - DEBUG - Event name: FileReadyToParse
2014-02-12 16:39:37,853 - INFO - Adding buffer identifiers for file: /home/kamel/labola/src/app/mixin/alert.py

截图:


修复方法: 这是由python-mode自动补全导致的。当

let g:pymode_rope_complete_on_dot = 0

如果在.vimrc中设置了,它就解决了!


那么,如果您在按下点号后继续输入...会发生什么?YCM应该会弹出此窗口,但当您继续输入时,它应该插入第一个选择。 - Conner
你安装了Python的任何插件吗? - Conner
你可以尝试在没有这些插件的情况下使用YCM,以查看问题是否仍然存在。如果是这样,那么这似乎是一个bug,请在github上提交给他们的问题跟踪器。 - Conner
请将您的答案放在回答中,而不是编辑您的问题。 - Conner
1个回答

12
由于与 Python-mode 自动完成功能的冲突导致了这个问题。
let g:pymode_rope_complete_on_dot = 0

.vimrc文件中,问题已经解决!


由于不建议同时使用pymodeYouCompleteMe的自动补全功能,使用以下命令完全取消pymode的补全功能。

let g:pymode_rope_completion = 0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接