(Vim) - 无法使用Vundle插件 - 未知功能

时间:2014-09-10 00:34:51

标签: windows git vim

我遵循了这个安装指南:

https://github.com/gmarik/Vundle.vim/wiki/Vundle-for-Windows

正确安装了Curl和git,但是vundle存在问题。老实说,我不知道问题出在哪里。

以下是加载vim时出现的错误:

Error detected while processing C:\SPB_Data\_vimrc
line 7:
E117: Uknown function: vundle#begin
line 10:
E492: Not an editor command: Plugin 'gmarik/Vundle.vim'
line 15:
E492: Not an editor command: Plugin 'tpope/vim-fugitive'
line 18:
E117: Unknown function: vundle#end
"

这是我的_vimrc:

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/vimfiles/bundle/Vundle/
let path='~/vimfiles/bundle'
call vundle#begin(path)

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

set textwidth=79  " lines longer than 79 columns will be broken
set shiftwidth=4  " operation >> indents 4 columns; << unindents 4 columns
set tabstop=4     " a hard TAB displays as 4 columns
set expandtab     " insert spaces when hitting TABs
set softtabstop=4 " insert/delete 4 spaces when hitting a TAB/BACKSPACE
set shiftround    " round indent to multiple of 'shiftwidth'
set autoindent    " align the new line indent with the previous line
set showcmd     " show last command entered in the bottom bar
set cursorline    " highlist current line
set wildmenu    " visual complete

if has("gui_running")
  " GUI is running or is about to start.
  " Maximize gvim window.
  set lines=999 columns=999
else
  " This is console Vim.
  if exists("+lines")
    set lines=50
  endif
  if exists("+columns")
    set columns=80
  endif
endif

如果有人可以提供帮助,我将非常感激。我确定它很小,但我不知道它是什么,我不确定它是什么,我在网上发现它还没有修复它。

编辑:解决:显然Windows不会扩展〜\所以它必须是vimfiles。现在一切都有效。

2 个答案:

答案 0 :(得分:3)

以下适用于Windows,Linux和Mac。

set nocompatible
set rtp+=$HOME/.vim/bundle/vundle
let path='$HOME/.vim/bundle'
call vundle#rc('$HOME/.vim/bundle')

这假定:

  • .vim
  • 有一个C:\Users\user-name\.vim目录
  • .vimrc
  • 内有C:\Users\user-name\.vimrc
  • bundle
  • 处创建名为C:\Users\user-name\.vim\bundle的目录
  • 在命令提示符处导航到C:\Users\user-name\.vim\bundle,然后运行:

git clone https://github.com/gmarik/Vundle.vim.git vundle

  • 现在从命令行运行vim并运行:BundleInstall

答案 1 :(得分:1)

{`set nocompatible " be iMproved, required
filetype off     " required
" set the runtime path to include Vundle and initialize
set rtp+=~/vimfiles/bundle/Vundle.vim
call vundle#begin('/c/users/admin/vimfiles/bundle/Vundle.vim/ftplugin')}

这是我在Vundle中安装Plugin时解决问题的方法。 (对于Windows)

也许它可以帮助某人。