【问题标题】:Vim plugin "command t" throws an errorVim 插件 "command t" 抛出错误
【发布时间】:2015-02-05 19:02:20
【问题描述】:

我是 Vim 新手,刚刚使用 vundle 安装了 Command T 插件。当我想在 Vim 中使用它时,出现以下错误

Error detected while processing function commandt#CommandTShowFileFinder:
line    2:
LoadError: /Users/xafar/.vim/bundle/command-t/ruby/command-t/finder.rb:4:in `require': no such file to load -- command-t/ext

我的 mac os x 上有 ruby​​ 版本 ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]Mavericks

我该如何解决这个问题?

【问题讨论】:

  • 这个错误让我觉得你没有正确安装 Command-T。请再次查看安装说明。作为替代方案,您可以使用像 CtrlP.vim 这样的纯 vimscript 插件作为模糊查找器。

标签: ruby vim plugins vim-plugin


【解决方案1】:

仅从 Vundle 安装 Command-T 不会使其正常运行。它仍然需要编译。

From the Command-T install guide-

Compiling Command-T ~

The C extension must be built, which can be done from the shell. If you use a
typical Pathogen, Vundle or NeoBundle set-up then the files were installed inside
`~/.vim/bundle/command-t`. A typical VAM installation path might be
`~/.vim/vim-addons/command-t`.

Wherever the Command-T files were installed, you can build the extension by
changing to the `ruby/command-t` subdirectory and running a couple of commands
as follows:

  cd ~/.vim/bundle/command-t/ruby/command-t
  ruby extconf.rb
  make

Note: If you are an RVM or rbenv user, you must build CommandT using the same
version of Ruby that Vim itself is linked against. You can find out the
version that Vim is linked against by issuing following command inside Vim:

  :ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"

【讨论】:

    猜你喜欢
    • 2011-12-16
    • 1970-01-01
    • 2013-07-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-08
    • 2015-09-23
    • 1970-01-01
    相关资源
    最近更新 更多