美文网首页
Vim编译支持Python

Vim编译支持Python

作者: 夙小叶 | 来源:发表于2020-04-07 13:56 被阅读0次

  1. GitHub下载最新源代码
  2. 创建安装位置
  3. 编译(./configure --help查看具体要求)
  4. 安装
  5. 设置环境变量

下载源代码:

https://github.com/vim/vim/releases

创建安装目录或直接安装到 /usr/local

mkdir -p /usr/local/vim8

查看说明:

./configure --help

编译选项:

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --disable-darwin        Disable Darwin (Mac OS X) support.
  --disable-smack     Do not check for Smack support.
  --disable-selinux   Do not check for SELinux support.
  --disable-xsmp          Disable XSMP session management
  --disable-xsmp-interact Disable XSMP interaction
  --disable-netbeans      Disable NetBeans integration support.
  --disable-channel       Disable process communication support.
  --disable-rightleft     Do not include Right-to-Left language support.
  --disable-arabic        Do not include Arabic language support.
  --disable-farsi         Deprecated.
  --disable-gtktest       Do not try to compile and run a test GTK program
  --disable-icon-cache-update        update disabled
  --disable-desktop-database-update  update disabled
  --disable-largefile     omit support for large files
  --disable-canberra      Do not use libcanberra.
  --disable-acl           No check for ACL support.
  --disable-gpm           Don't use gpm (Linux mouse daemon).
  --disable-sysmouse      Don't use sysmouse (mouse in *BSD console).
  --disable-nls           Don't support NLS (gettext()).


  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-fail-if-missing    Fail if dependencies on additional features 
        specified on the command line are missing.
  --enable-luainterp=OPTS      Include Lua interpreter.  default=no OPTS=no/yes/dynamic
  --enable-mzschemeinterp      Include MzScheme interpreter.
  --enable-perlinterp=OPTS     Include Perl interpreter.  default=no OPTS=no/yes/dynamic
  --enable-pythoninterp=OPTS   Include Python interpreter. default=no OPTS=no/yes/dynamic
  --enable-python3interp=OPTS  Include Python3 interpreter. default=no OPTS=no/yes/dynamic
  --enable-tclinterp=OPTS      Include Tcl interpreter. default=no OPTS=no/yes/dynamic
  --enable-rubyinterp=OPTS     Include Ruby interpreter.  default=no OPTS=no/yes/dynamic
  --enable-cscope         Include cscope interface.
  --enable-terminal       Enable terminal emulation support.
  --enable-autoservername Automatically define servername at vim startup.
  --enable-multibyte      Include multibyte editing support.
  --enable-xim            Include XIM input support.
  --enable-fontset        Include X fontset output support.
  --enable-gui=OPTS       X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/haiku/photon/carbon
  --enable-gtk2-check     If auto-select GUI, check for GTK+ 2 default=yes
  --enable-gnome-check    If GTK GUI, check for GNOME default=no
  --enable-gtk3-check     If auto-select GUI, check for GTK+ 3 default=yes
  --enable-motif-check    If auto-select GUI, check for Motif default=yes
  --enable-athena-check   If auto-select GUI, check for Athena default=yes
  --enable-nextaw-check   If auto-select GUI, check for neXtaw default=yes
  --enable-carbon-check   If auto-select GUI, check for Carbon default=yes

编译:

$ ./configure --with-features=huge \
--enable-python3interp \
--enable-pythoninterp \
--enable-rubyinterp \
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ \
--with-python3-config-dir=/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu \
--prefix=/usr/local/vim8/

# 若是直接安装到 /usr/local
--prefix=/usr/local

$ make

注意 python3 对应的版本(python3有多个版本)

ls /usr/lib/ | grep python

python2.7
python3
python3.7

安装:

make install

设置环境变量(安装到 /usr/local 则跳过):

# 临时
export PATH=/usr/local/vim8/bin:$PATH

# 永久
echo -e "export PATH=/usr/local/vim8/bin:$PATH" >> ~/.bashrc 或者 ~/.zshrc

卸载:

make uninstall

截屏2020-04-07 13.08.43.png 截屏2020-04-07 13.52.04.png

相关文章

  • 安装vim并支持python3

    编译安装vim并支持python3,以centos7为例子 1 编译安装python3 2 编译安装vim并支持p...

  • Vim 开启python/python3支持

    1. 检查vim是否支持python 经检查,发现vim不支持python2 2. 下载vim8源码 2. 编译安...

  • 编译安装VIM

    Vim 编译安装vim 安装依赖库(支持Python 3、Lua、Ruby) 删除原有Vim 首先查询系统中有哪些...

  • Vim编译支持Python

    GitHub下载最新源代码 创建安装位置 编译(./configure --help查看具体要求) 安装 设置环境...

  • vim

    vim-go 安装 下载最新版的vim编译./configure \ --enable-python...

  • 源码安装vim支持python3

    要支持python3,可以下载源代码重新编译Vim: 第一步:安装必备库,比如Git。Ubuntu,Debian使...

  • vim python代码自动补全

    确认目前的vim是否支持python2或python3,https://www.vim.org/download....

  • Setup VIM8+SpaceVIM on Ubuntu 16

    VIM8+SpaceVIM 本文记录了如何在ubuntu16.04 上编译vim8(python3+,lua+),...

  • vim配置文件推荐

    记录下我的vim简单配置,防止我忘了 环境:deepin 15.5 vim版本:8.0 语法包支持:Python,...

  • 利器系列-更高效的Vim

    截图 安装 (你需要一个有Python支持的Vim版本. 请使用 vim --version | grep +py...

网友评论

      本文标题:Vim编译支持Python

      本文链接:https://www.haomeiwen.com/subject/bligphtx.html