1、安装pathogen
github: https://github.com/tpope/vim-pathogen
mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -Sso ~/.vim/autoload/pathogen.vim \
https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
在.vimrc中添加
execute pathogen#infect()
syntax on
filetype plugin indent on
2、移动.vimrc文件到.vim目录:
mv .vimrc ~/.vim/vimrc
3、建立连接
ln -s ~/.vim/vimrc ~/.vimrc
4、初始化git仓库,提交
cd ~/.vim
git init
git add .
git commit -m "Initial commit"
5、安装插件
cd ~/.vim
mkdir ~/.vim/bundle
git submodule add http://github.com/tpope/vim-fugitive.git bundle/fugitive
git add .
git commit -m "Install Fugitive.vim bundle as a submodule."
git push -u origin master
6、在新机器上安装
cd ~
git clone https://github.com/yseasony/xvim.git ~/.vim
ln -s ~/.vim/vimrc ~/.vimrc
ln -s ~/.vim/gvimrc ~/.gvimrc
cd ~/.vim
git submodule init
git submodule update
7、更新插件
cd ~/.vim/bundle/fugitive
git pull origin master
更新所有插件
git submodule foreach git pull origin master