python3、vim 8和pythoncomp

2024-09-30 05:23:10 发布

您现在位置:Python中文网/ 问答频道 /正文

在vim中编辑python文件并在插入模式下按Ctrl+x,然后按Ctrl+o,结果是

Error: Required vim compiled with +python
E117: Unbekannte Funktion: pythoncomplete#Complete

我读了很多帖子,做了很多摸索,直到现在:

  • 我使用的是vim 8.0.54
  • 安装的python和vim都是32位的
  • Vim:vers返回。。。+python/dyn和{}
  • :vers-DDYNAMIC_PYTHON3_DLL=\"python35.dll\"中提到的python35.dll文件与{}位于同一个文件夹中
  • 在我的_vimrclet g:pymode_python = 'python3'中,应该将vim告诉用户python3
  • :echo has ('python3')返回1

但错误仍然存在。。。除了键盘前面的错误,你知道吗?在

更新2016-11-08:

这不是个好办法,但它解决了我的问题。我变了 setlocal omnifunc=pythoncomplete#Completesetlocal omnifunc=python3complete#Completeftplugin-folderpython.vim文件中。现在一切正常。在不修改Python.vim文件?在

更新2016-11-08:

最后在我的vimrc中用autocmd BufNewFile *.py :set omnifunc=python3complete#Complete解决了这个问题


Tags: 文件编辑错误模式vimpython3completedll
1条回答
网友
1楼 · 发布于 2024-09-30 05:23:10

这是你编译的Vim吗?vers结果看起来是正确的。错误E117是特定于使用vim的eval特性调用函数的。在

但是,let g:pymode_python = 'python3变量用于特定的“python模式”插件。在

  1. python3库是否在您的搜索路径中?
  2. python和{}是用 enable-shared编译的吗?

是要回答的问题。在

不确定vim是否首先搜索它自己的可执行文件夹,但是要检查它,可以执行以下操作:

To use the Python interface the Python DLL must be in your search path. In a console window type "path" to see what directories are used.

在文档中可能有更深入的了解:doc/if_pyth.html#python-dynamic

高温

相关问题 更多 >

    热门问题