安装Command-T,怎么解决vim --version中提示 -ruby ?

Vim、Emacs配置和使用
回复
头像
0xff
帖子: 415
注册时间: 2008-08-12 14:24
联系:

安装Command-T,怎么解决vim --version中提示 -ruby ?

#1

帖子 0xff » 2013-09-09 11:37

操作系统:CentOS 6.3

安装Command-T,按照帮助文档执行操作,安装完毕后在vim里调用,提示:

代码: 全选

command-t.vim requires Vim to be compiled with Ruby support
For more information type: :help command-t
执行:help command-t查看文档,按照REQUIREMENTS段落里一步步操作

代码: 全选

$ vim --version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 5 2012 10:17:30)
包含补丁: 1-411
修改者 <bugzilla@redhat.com>
编译者 <bugzilla@redhat.com>
巨型版本 无图形界面。 可使用(+)与不可使用(-)的功能:
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
+jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
+menu +mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
+multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra +perl +postscript
+printer +profile +python +quickfix +reltime +rightleft -ruby +scrollbind
+signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax
+tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse
+textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup
-X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
系统 vimrc 文件: "/etc/vimrc"
用户 vimrc 文件: "$HOME/.vimrc"
用户 exrc 文件: "$HOME/.exrc"
$VIM 预设值: "/usr/share/vim"
编译方式: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=1 -D_REENTRANT -D_GNU_SOURCE -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -I/usr/include/python2.6 -pthread
链接方式: gcc -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE -L/usr/local/lib -o vim -lselinux -lncurses -lacl -lgpm -Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lutil -lc -L/usr/lib64/python2.6/config -lpython2.6 -lutil -lm -Xlinker -export-dynamic

代码: 全选

$ vim --version|grep ruby
+printer +profile +python +quickfix +reltime +rightleft -ruby +scrollbind
文档说+ruby才对,我这里是-ruby,但是在vim里执行
:ruby 1
没有出现文档中说的错误(没有任何提示,但也没有输出,总之就是没反应)

我的vim是使用yum安装的,莫非只有自己编译vim源码才能使用command-t ?

另外,我实验了这个方法:
http://kzhiwei.wordpress.com/2011/09/21 ... y-support/
无效
头像
zhw2101024
帖子: 1849
注册时间: 2009-03-28 16:10
系统: Arch debian win7
联系:

Re: 安装Command-T,怎么解决vim --version中提示 -ruby ?

#2

帖子 zhw2101024 » 2013-09-09 13:06

搜索一下有没有vim-ruby之类的软件包?
没有的话这个情况是要自己编译的
头像
0xff
帖子: 415
注册时间: 2008-08-12 14:24
联系:

Re: 安装Command-T,怎么解决vim --version中提示 -ruby ?

#3

帖子 0xff » 2013-09-09 14:09

相关的包都装了,vim,ruby。vim-ruby,ruby-devel都装了
wangjun403
帖子: 433
注册时间: 2009-07-06 14:26

Re: 安装Command-T,怎么解决vim --version中提示 -ruby ?

#4

帖子 wangjun403 » 2013-09-10 8:52

0xff 写了:相关的包都装了,vim,ruby。vim-ruby,ruby-devel都装了
这个是要你重新编译vim的时候加入支持ruby的特性

你可以去试试ctrlp,可以command-t差不多的作用,但是用vimscripts写的,速度很快,功能很强大
生命只不过是上帝借你一用的资本!
头像
lilydjwg
论坛版主
帖子: 4249
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

Re: 安装Command-T,怎么解决vim --version中提示 -ruby ?

#5

帖子 lilydjwg » 2013-09-14 14:53

Debian 的话 vim-nox 包是有 Ruby 支持的。CentOS 的话自己找找。不行就自己编译一个。另外,Vim 7.2.411 太老了吧。

:ruby 1 不报错的话,说明 Ruby 是支持了的呀。难道是使用了不同版本的 Vim?
回复