折腾vim YouCompleteMe

服务器上的vim版本太低,安装YouCompleteMe居然要7.3.584版本以上的,鬼知道那个是7.3.584 ……

安装7.4吧,命令:

>cd  vim74
>
>./configure --prefix=/home/sunhy/software/vim74 --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-perlinterp=yes --enable-perlinterp=yes  --enable-pythoninterp=yes --with-python-config-dir=/share/software/software/python-2.7_install_dir/lib/python2.7/config --enable-perlinterp=yes --enable-luainterp=yes --enable-gui=gtk2 --enable-cscope
>
>make VIMRUNTIMEDIR=/home/sunhy/software/vim74
>
>sudo make install

安装完以后,打开vim时提示:

Error detected while processing /home/sunhy/.vimrc:
line 138:
E484: Can’t open file /home/sunhy/syntax/syntax.vim

提示是syntax的路径不对,所以在 .vimrc中加入了下列2行:

let $VIMRUNTIME=”/home/sunhy/software/vim/share/vim/vim74”
set runtimepath=/home/sunhy/software/vim/share/vim/vim74

OK,这个问题解决了,接着下面又出现问题了

YouCompleteMe unavailable: requires Vim compiled with Python 2.x support

真是见鬼哦,我在编译vim时明明加上的了–enable-pythoninterp,但在使用vim –version看的时候,又没有了。

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 9 2015 13:27:15)
Compiled by sunhy@login.local
Huge version without GUI. Features included (+) or not (-):
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
+clientserver -hangul_input +netbeans_intg +title
+clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak -python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu -ruby +writebackup
+digraphs +mksession +scrollbind +X11
-dnd +modify_fname +signs +xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape -sniff +xsmp_interact
+eval +mouse_dec +startuptime +xterm_clipboard
+ex_extra -mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop
+farsi +mouse_netterm +syntax
system vimrc file: “$VIM/vimrc”
user vimrc file: “$HOME/.vimrc”
2nd user vimrc file: “~/.vim/vimrc”
user exrc file: “$HOME/.exrc”
fall-back for $VIM: “/home/sunhy/software/vim74/share/vim”
f-b for $VIMRUNTIME: “/home/sunhy/software/vim74”
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE -L/usr/local/lib -Wl,–as-needed -o vim -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -liconv -lacl -lattr -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc

啊,头大了。先不弄了,后面再弄吧。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值