在网上找了一些~/.vimrc文件,写入~/.vimrc文件,用source ~./.vimrc生效。
再通过vim编辑时会提示错误
Error detected while processing /root/.vimrc:
line 9:
E492: Not an editor command: Plugin ‘VundleVim/Vundle.vim‘
line 13:
E492: Not an editor command: Plugin ‘tpope/vim-fugitive‘
line 17:
E492: Not an editor command: Plugin ‘git://git.wincent.com/command-t.git‘
line 20:
E492: Not an editor command: Plugin ‘file:///home/gmarik/path/to/plugin‘
line 26:
E492: Not an editor command: Plugin ‘rstacruz/sparkup‘, {‘rtp‘: ‘vim/‘}
查到是需要安装Vundle的插件:
安装Vundle命令:
#git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
报错没装git,继续安装git
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
#[addons]
#name=CentOS-$releasever - Addons
#baseurl=http://mirrors.163.com/centos/6/addons/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/6./centosplus/$basearch/
gpgcheck=1
enabled=0
source /etc/yum.repos.d/rhel-source.repo 不知道有没有用
yum及源就已经安装并配置好了
用yum安装git,
#yum install git
#git --version
后面报错又发现还需要安装curl和curl-devel
安装curl和curl-devel后,用yum成功安装上了git,对一个新手来说不容易呀
安装vim的bundle插件
#git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
感谢网上的资料~
原文地址:http://blog.51cto.com/tp168/2126736