"关闭vi兼容模式
set nocompatible
syntax enable
syntax on
"配色方案
colorscheme pablo
set history=100
set magic
set fen
set fdl=0
"切换当前目录为当前文件所在目录
set autochdir
"show line number
set number
"状态栏标尺
set ruler
"highlight the researched result
set hlsearch
"show the result when input
set incsearch
"禁止在搜索到文件两端时重新搜索
"set nowrapscan
"tab width is 4
set tabstop=4
"退格键删除4个空格
set softtabstop=4
"设定<<和>>命令移动时的宽度为4
set shiftwidth=4
"覆盖文件时不备份
set nobackup
"插入括号时,短暂的跳转到匹配的对应括号
set showmatch
"短暂跳转到匹配括号的时间
set matchtime=2
"注释换行时自动加上前导的空格和星号
set formatoptions=tcqro
"在单词中间断行
"set nolinebreak
"设定光标离窗口上下边界5行时窗口自动滚动
set scrolloff=5
"自动缩进
set autoindent
set smartindent
set cindent
"在状态栏显示目前所执行的指令,未完成的指令片段亦会显示出来
set showcmd
"搜索时忽略大小写,但在有一个或以上大写字母时仍保持对大小写敏感
set ignorecase smartcase
"highlight the current line
set cursorline
filetype on
filetype plugin on
filetype indent on
"设定命令行的行数为1
set cmdheight=1
"显示状态栏
set laststatus=2
"状态栏信息
set statusline=%F%m,%Y,%{&fileformat}\ \\ASCII=\%b,HEX=\%B\\\%l,%c\,%p%%\\\[\%L\lines\in\all\]
hi comment guifg=green
hi constant guifg=yellow
hi statement guifg=blue
hi preproc guifg=magenta
hi type guifg=blue
hi special guifg=red