在用户的主目录中建立 .vim 目录,在 .vim 目录中建立 bundle 目录,以后Vundle自动下载的插件都保存在这里。然后,进入 Bundle 目录,使用 git clone 命令下载vundle。
mkdir .vim
cd .vim
mkdir bundle
cd ~
vim .vimrc
content of .vimrc
” Use vundle to manage plugin, required turn file type off and nocompatible
filetype off
set nocompatible
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
” Let vundle manage vundle, required
Bundle ‘gmarik/vundle’
” Brief help of vundle
“:BundleList
“:BundleInstall
“:BundleSearch
“:BundleClean
“:help vundle
” End Brief help
syntax on ” syntax highlight on
set cursorline ” highlight current line
set number ” show line number
set ruler
set showcmd
set showmode
set laststatus=2
set cmdheight=1
set scrolloff=3
” fill space between windows
” set fillchars=stl:\ ,stlnc:\ ,vert;\
” Tab and indent
set tabstop=4 ” length is four spaces
set expandtab ” replace with four spaces
set autoindent
set smartindent ” smart indent
set cindent ” apply indent of previous line
” Search related
set showmatch
set ignorecase smartcase ” ignore case when search, but keep case sensitive when the word have one upper case
set nowrapscan ” no wrap scan
set incsearch ” dynamically show search result
set hlsearch ” highlight when search
set magic ” enable Data Link Escape Character cancellation
” Close annoying error message
set noerrorbells ” close error bell
set novisualbell ” close visual bell
set t_vb= ” empty bell
” Configure backspace to be able to across two lines
set backspace=2
set whichwrap+=<,>,h,l
” Files, backups and encoding
set nobackup
set noswapfile
set autoread ” automatically update file when changed outsidely
set autowrite ” automatically write to disk when changed
set fileencodings=ucs-bom,utf-8,gb18030,gbk,gb2312,cp936
set fileencoding=utf-8
set fileformats=unix,dos,mac
filetype plugin on
filetype indent on