简体   繁体   English

在vim中获得python支持

[英]Getting python support in vim

After reading short guide and this question I figure out how to configure Vim: 在阅读了简短指南和这个问题之后,我弄清楚了如何配置Vim:

./configure --with-features=huge --enable-rubyinterp --enable-pythoninterp 
--enable-perlinterp --enable-gui=gtk2 --enable-cscope --prefix=/usr 
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/

And now make && sudo make install . 现在make && sudo make install Here is the log of ./configure command. ./configure命令的日志。 But the problem is here that after this build I didn't get python support. 但是问题出在这里,在此构建之后,我没有获得python支持。 Below I paste two lines of the list of a features what I see when launch Vim and typing ":version" 下面,我在启动Vim并输入“:version”时看到的功能列表的两行粘贴

+cindent -ebcdic +jumplist -mouse_jsbterm -python -tag_any_white +windows 
+clientserver -emacs_tags -keymap -mouse_netterm -python3

"-" sign means the disabled features, to my regret the python one of them. “-”符号表示禁用的功能,对不起,python其中之一。 Am I miss something? 我想念什么吗? Thanks in advance! 提前致谢!

eg. 例如。 for vim73: 对于vim73:

./configure --enable-pythoninterp | grep python
checking --enable-pythoninterp argument... yes
checking for python... (cached) /usr/bin/python
(cached) checking Python's configuration directory... (cached) /usr/lib/python2.6/config
checking --enable-python3interp argument... no

:version :版

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 17 2013 00:21:48)
+python -python3
-L/usr/local/lib -o vim    -lncurses -L/usr/lib/python2.6/config -lpython2.6 -lpthread 
-ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions

Are you sure you run just your compiled vim version? 您确定只运行编译的vim版本吗? Likely you run old code from /usr/bin/vim, try to reload bash to run from /usr/local/bin/vim. 您可能从/ usr / bin / vim运行旧代码,尝试重新加载bash从/ usr / local / bin / vim运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM