2017-09-23 33 views
1

我用Vundle作为我的vim的插件管理器源vimrc文件和我注意到,当我运行不能与Vundle

source ~/.vimrc它给了我一个vundle加载错误。不过,我的插件工作正常。

我得到的错误是

192-168-1-9:dotfiles sameeragayan$ source ~/.vimrc 
-bash: filetype: command not found 
-bash: set the runtime path to include Vundle and initialize 
set rtp+=~/dotfiles/vim/bundle/Vundle.vim 
call vundle#begin() 



: No such file or directory 
-bash: Plugin: command not found 
-bash: /Users/sameeragayan/.vimrc: line 13: syntax error near unexpected token `(' 
-bash: /Users/sameeragayan/.vimrc: line 13: `call vundle#begin()' 

当我检查路径(~/dotfiles/vim/bundle/Vundle.vim)我可以看到Vundle文件路径

enter image description here

下面是我的vimrc文件(该文件符号链接~/.vimrc

set nocompatible " be iMproved, required 
filetype off  " required 
filetype plugin indent on 
" set the runtime path to include Vundle and initialize 
set rtp+=~/dotfiles/vim/bundle/Vundle.vim 
call vundle#begin() 



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

call vundle#begin() 

" other plugins plugins 
" E.g Plugin 'vim-airline/vim-airline' 

call vundle#end() 

我的vim版本是 - 版本8.0.1100。 MacOS版本是 - 10.12.5(MacOSSierra)。

PS:我做了检查this SO question没有运气

+4

不要使用bash来阅读你的vimrc。 – FDinoff

+2

你为什么要在你的shell中使用'source〜/ .vimrc'?这没有道理; '.vimrc'不是一个shell脚本。 – melpomene

+0

你是什么意思你检查https://stackoverflow.com/questions/13365129/why-cant-i-source-my-vimrc-after-installing-vundle没有运气?这是完全一样的问题,答案/评论说出了什么问题。 – melpomene

回答

0

由于两个FDinoff并提到melpomene,我不能从源bash的一个vimrc文件。

有关更多详细信息,请参阅following SO question