Vim compilation (with Python)

Source: Internet
Author: User

This theme looks a little dirt, you are a program ape, even all day will be configured, build, compile, play vim. You've been mixed up for almost 10 years, how do you write code? Ashamed to say, why write this, because this compilation bothered me for two days. Anyway, even America Silicon Valley has me, haha.

If your system Python is pure, a 2.7 or more, then this article is of no value, if you have a wide variety of system Python, then you might want to look at my article. I checked the search engine, 1.1.

First of all, my system, the system is redhat5.3,64bit. The system comes with python2.4.3 64bit. Root user also installed a python2.7 is also 64bit. Our production system installation packages are compiled with 32bit (backward bar), so there is a 32bit version of the python2.7 in the environment variables. command line type, the 32bit version is used by default.

But vim compiles otherwise, vim oneself configure--prefix= $HOME This kind of, will find/usr/local this kind of directory by itself. If Vim opens Python, look for the python2.7/config/config.c file. I didn't find the 32bit python directory with this. c file, but I found it in/usr/local/lib/python2.7/config. So the equivalent I found 64bit python source config.c, using 32bit binary lib for vim compilation.

I can imagine how I struggled to brains this step. I am not root, if I have root authority, I am yum install, (RM-RF * haha)

Here is the detailed configuration of my vim7.4, open python deadly ah ... (Unpack into the Vim74 directory)

vi_cv_path_python=/home/xxx/soft/python-2.7/bin/python./configure prefix=/home/xxx/bin--with-features= Huge--enable-cscope--enable-pythoninterp--with-python-config-dir=/usr/local/lib/python2. 7/config--with-local-dir=/home/xxx/soft/python-2.7  --disable-selinux

After the Configure is successful, makefile is generated and then Make;make install

Under detailed instructions,

  
Prefix is to install the VIM path
--with-features is the VIM support function size, I choose the largest, after all, to support multibyte and other functions
--enable-cscope is my favorite cscope plugin.
--disable-selinux is the Netizen informed, not add there are a few warning
--enable-pythoninterp don't have to speak more
--with-python-config-dir is the directory where config.c and makefile are located.
--with-local-dir is the directory where 32bit python lib resides

Bingo, get it done!


Vim compilation (with Python)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.