我正试图安装绝地维姆。我是在工作的时候这样做的,所以我必须在Windows中使用gVim。我已经在这个论坛上读过其他几篇文章了。这使我变得更聪明,但仍然不能解决我的问题。在
我做了以下事情:
现在,当我打开*.py文件时,vim总是告诉我
jedi-vim requires vim compiled with +python
但是“:version”告诉我它是用+python/dyn
和+python3/dyn
编译的。
那么问题是什么呢?在
其他信息:
Error detected while processing function jedi#completions: line 1: E492: Not an editor command: Python jedi_vim.completions()
Error detected while processing function jedi#completions: line 1: E492: Not an editor command: Python jedi_vim.completions()
Press ENTER or type command to continue
我不确定你是否还在经历同样的问题,但是在我四处看看之后,我发现了这篇博客文章,它为我解决了这个问题。本质上,它只是重新安装vim(不要删除任何配置文件),然后用正确的标志从vim mercurial repo的源代码重新安装。可能有一个更简短/更简单的方法,但在反复尝试了许多解决方案后,只有这一个有效:
步骤如下: 检查Vim是否使用Python编译:
拆除已安装的Vim版本:
^{pr2}$安装编译Vim所需的依赖项:
克隆Vim存储库,编译并安装新版本:
当时的问题是另一个问题。我混淆了vim和python的架构——我使用的是vim64Bit,而pyton是32bit。 一段时间前我已经修复过了,但前几天我不得不重新启动计算机并进行一些microsoft更新。 不幸的是,我的vim(7.4)完全崩溃了。我不得不重新设置我的主目录。那么至少我的维姆RC又可以进入了,但我在维姆的绝地武士仍然不能工作。在
Python在vim中可用,但jedi似乎仍然无法正确加载。 当我键入“len”(在.py文件的开头,应该解释参数的地方有一些奇怪的字符,类似于: =
=jedi=0, =
=(对象>==jedi=
=当我键入“self.”时,它显示“unknown function:pythoncomplete\Complete”
我认为这只是一个配置问题,因为它在重启前就起作用了。 Jedi在全系统范围内安装(使用pip)。如果我试图“再次”安装它,皮普说绝地武士已经安装好了。在
非常感谢您的帮助;—)
+python/dyn
表示Python支持不是静态编译的,而是在运行时根据需要动态加载。在这在python-dynamic帮助部分中有描述:
(不用担心那里的2.4;我只是碰巧找到了几年前的文档。请阅读您自己的vim副本中的帮助,或者最好按照最后一段的内容进行操作。)
所以,要么你没有Python,要么Python版本错误,它不在你的
%PATH%
上,vim错误地搜索它,或者它无法加载。在相关问题 更多 >
编程相关推荐