安裝gitv 在vim 中版本控制

通常在電腦中都有 git 了,若是你沒有裝,可以找這裡:安裝git
另外這是 git 的詳解書:Pro Git 中文

要用vim 的plugin 與 git 進行版本控制,
首先你要先裝 vim plugin 的控制plugin : Vundle
然後再用vundle 來裝 vim-fugitivegitv
首先輸入 (以下摘自 https://github.com/VundleVim/Vundle.vim )

$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

安裝 Vundle。

然後在 ~/.vimrc 中多加:

set nocompatible " be iMproved, required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/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'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Avoid a name conflict with L9
Plugin 'user/L9', {'name': 'newL9'}
Plugin 'gregsexton/gitv'

" 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

其中最重要的兩個是

Plugin 'tpope/vim-fugitive'
Plugin 'gregsexton/gitv'

然後在vim 的環境中輸入

:PluginInstall

Vundle 會開始幫你檢查,並開始安裝 plugin

在vim中使用github的安裝版本控制
gitv the download page

相關文章

  1. cwtex win7 中找不到 postscript
  2. Batch Set
  3. In a bash script what does a dot…
  4. timeline test http www freshlabs de journal archives…
  5. vim pattern http blog vgod tw 2011 03…