Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Python支持重新编译VIM,以实现clang_complete_Vim_Vim Plugin_Clang Complete - Fatal编程技术网

使用Python支持重新编译VIM,以实现clang_complete

使用Python支持重新编译VIM,以实现clang_complete,vim,vim-plugin,clang-complete,Vim,Vim Plugin,Clang Complete,我已经在谷歌上搜索了大约一个小时,很多人都有同样的问题,尽管我似乎无法得到答案。我正试图让clang_完成工作,我知道我需要Vim中的Python支持。根据:version,我的Vim编译缺少-python和-python3。简单问题:在Linux Debian上,如何使用python支持重新编译Vim?要启用python解释器,请尝试 ./configure --enable-pythoninterp=yes --enable-python3interp=yes && make

我已经在谷歌上搜索了大约一个小时,很多人都有同样的问题,尽管我似乎无法得到答案。我正试图让clang_完成工作,我知道我需要Vim中的Python支持。根据
:version
,我的Vim编译缺少
-python
-python3
。简单问题:在Linux Debian上,如何使用python支持重新编译Vim?

要启用python解释器,请尝试

./configure --enable-pythoninterp=yes --enable-python3interp=yes && make && make install
通过查看
src/auto/configure
,您可以获得功能和软件包的列表。这是我的版本
7.4
中的一个

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-fail-if-missing    Fail if dependencies on additional features
     specified on the command line are missing.
  --disable-darwin        Disable Darwin (Mac OS X) support.
  --disable-selinux   Don't check for SELinux support.
  --disable-xsmp          Disable XSMP session management
  --disable-xsmp-interact Disable XSMP interaction
  --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      Include Tcl interpreter.
  --enable-rubyinterp=OPTS     Include Ruby interpreter.  default=no OPTS=no/yes/dynamic
  --enable-cscope         Include cscope interface.
  --enable-workshop       Include Sun Visual Workshop support.
  --disable-netbeans      Disable NetBeans integration support.
  --enable-sniff          Include Sniff interface.
  --enable-multibyte      Include multibyte editing support.
  --enable-hangulinput    Include Hangul input 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/motif/athena/neXtaw/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-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
  --disable-gtktest       Do not try to compile and run a test GTK program
  --disable-largefile     omit support for large files
  --disable-acl           Don't 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()).

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-mac-arch=ARCH    current, intel, ppc or both
  --with-developer-dir=PATH    use PATH as location for Xcode developer tools
  --with-local-dir=PATH   search PATH instead of /usr/local for local libraries.
  --without-local-dir     do not search /usr/local for local libraries.
  --with-vim-name=NAME    what to call the Vim executable
  --with-ex-name=NAME     what to call the Ex executable
  --with-view-name=NAME   what to call the View executable
  --with-global-runtime=DIR    global runtime directory in 'runtimepath'
  --with-modified-by=NAME       name of who modified a release version
  --with-features=TYPE    tiny, small, normal, big or huge (default: normal)
  --with-compiledby=NAME  name to show in :version message
  --with-lua-prefix=PFX   Prefix where Lua is installed.
  --with-luajit           Link with LuaJIT instead of Lua.
  --with-plthome=PLTHOME   Use PLTHOME.
  --with-python-config-dir=PATH  Python's config directory
  --with-python3-config-dir=PATH  Python's config directory
  --with-tclsh=PATH       which tclsh to use (default: tclsh8.0)
  --with-ruby-command=RUBY  name of the Ruby command (default: ruby)
  --with-x                use the X Window System
  --with-gnome-includes=DIR Specify location of GNOME headers
  --with-gnome-libs=DIR   Specify location of GNOME libs
  --with-gnome            Specify prefix for GNOME files
  --with-motif-lib=STRING   Library for Motif
  --with-tlib=library     terminal library to be used

您需要先安装python3devppkg

sudo-apt-get-install-python3-dev

然后从源代码编译vim

/configure--enable-python3interp=dynamic&&make&&makeinstall


现在您有了支持python3的vim作为动态加载库。

$sudo apt get install vim gtk应该足够了。我没有这样的目录src/auto/configure,我没有手动构建vim,而是通过apt get(debian respository)拉取它。