我现在正尝试在Windows 7中使用git bash配置VIM以支持Python。我按照this website进行配置步骤。 但是,每次我从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
如果有人能够善解释,我们将不胜感激。谢谢。