Hacker News new | ask | show | jobs
by s00pcan 4883 days ago
I ran into a couple of issues while building vim with python support (which I haven't needed until now). I have arch linux and python3 was symlinked to /usr/bin/python, the build script cached this and once I fixed the symlink to point to /usr/bin/python2 it was still giving an error. I manually fixed the check in the build script, compiled, but then the plugin didn't recognize +python/dyn so I had to rebuild without python3 support. It seems to be working now and I'm compiling ycm_core. Also, if you're going to be building vim anyway, --enable-rubyinterp and check out the command-t plugin.
2 comments

On Arch the 'gvim' package also includes a more featureful console vim, including python (2, not 3) support built-in. The downside is that the dependencies for gvim include GTK and a good chunk of X11.

If you do need a console-only vim on arch, it's probably best to build it by hand as you did, since the PKGBUILD in abs for the vim/gvim/vim-runtime set of packages doesn't lend itself well to custom builds.

Having both python2 and python3 enabled in your Vim can lead to nasty results. I remember Vim used to crash if you source a python2 file into it (thus starting the python2 interpreter) and a python3 file some time later (thus also starting the python3 interpreter). They didn't seem to like existing in the same process.