set nu
set encoding=utf-8
set st=4
set nocp
set is
set nocompatible " Vim settings, not Vi settings. must be first
set autoindent " Auto align when insert new line, for instance, when using o or O to insert new line.
set ruler " Show ruler at the bottom-right of vim window
set showcmd
set backspace=indent,eol,start " Enable delete for backspace under insert mode"
colorscheme darkblue
syntax on
if &term =~ "xterm"
if has("terminfo")
set t_Co=8
set t_Sf=^[[3%p1%dm
set t_Sb=^[[4%p1%dm
else
set t_Co=8
set t_Sf=^[[3%dm
set t_Sb=^[[4%dm
endif
endif
set backspace=indent,eol,start
if (has("gui_running"))
" 图形界面下的设置
set nowrap
set guioptions+=b
colo torte
else
" 字符界面下的设置
set wrap
colo ron
endif
set history=100
set confirm
filetype on
filetype plugin on
set iskeyword+=_,$,@,%,#,-
filetype indent on
set linespace=0
set ruler
set rulerformat=%20(%2*%<%f%=\ %m%r\ %3l\ %c\ %p%%%)
set cmdheight=2
set backspace=2
set whichwrap+=<,>,h,l
set mouse=a
set selection=exclusive
set selectmode=mouse,key
set shortmess=atI
set report=0
set noerrorbells
set showmatch
set formatoptions=tcrqn
set autoindent
set smartindent
" 使用C样式的缩进
set cindent
" 制表符为4
set tabstop=4
" 统一缩进为4
set softtabstop=4
set shiftwidth=4