2

我现在正在尝试在 Windows 7 中使用 git bash 配置 VIM 以支持 Python。我正在按照本网站的配置步骤进行操作。但是,每次我从 git bash 运行 vim 时,它都会显示以下错误:

$ vim
You need vim compiled with Python 2.6, 2.7 or 3.2 and later support
for Powerline to work. Please consult the documentation for more
details.
Press ENTER or type command to continue

我在网上搜索并发现可能的问题是 vim 无法找到共享库或 Python 与 VIM 支持不同。但是,我仍然无法修复它。我安装了 Python 2.7 和 3.6。以前,我遇到了通过 cmd 在 VIM 中找不到 python27.dll 的问题,我将 python27.dll 复制到 vim 目录中,但它不能正常工作。

这是我的 Python 版本

$ python --version
Python 3.6.3

这是我的 VIM 版本

$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 17 2017 08:39:44)
Included patches: 1-1305
Compiled by <alexpux@gmail.com>
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +tag_binary
+arabic          +file_in_path    +mouse_sgr       +tag_old_static
+autocmd         +find_in_path    -mouse_sysmouse  -tag_any_white
-autoservername  +float           +mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminal
++builtin_terms  +fork()          +multi_lang      +terminfo
+byte_offset     +gettext         -mzscheme        +termresponse
+channel         -hangul_input    +netbeans_intg   +textobjects
+cindent         +iconv           +num64           +timers
-clientserver    +insert_expand   +packages        +title
+clipboard       +job             +path_extra      -toolbar
+cmdline_compl   +jumplist        +perl/dyn        +user_commands
+cmdline_hist    +keymap          +persistent_undo +vertsplit
+cmdline_info    +lambda          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      +python3/dyn     +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      +startuptime     -xpm
+eval            +mouse_dec       +statusline      -xsmp
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
+extra_search    -mouse_jsbterm   +syntax          -xterm_save
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim80"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -D_FORTIFY_SOURCE=2 -I/usr/inc                                                                                                                lude/ncursesw  -march=x86-64 -mtune=generic -O2 -pipe -U_FORTIFY_SOURCE -D_FORTI                                                                                                                FY_SOURCE=1
Linking: gcc   -L. -pipe -fstack-protector -pipe -Wl,--as-needed -o vim.exe                                                                                                                        -lm    -lncursesw -liconv -lacl -lintl   -Wl,--enable-auto-import -Wl,--expor                                                                                                                t-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong  -L/usr/lib/                                                                                                                perl5/core_perl/CORE -lperl -lpthread -ldl -lcrypt

如果有人可以解释,将不胜感激。谢谢你。

4

0 回答 0