set nocompatible " 禁用与vi的兼容性
filetype on " 探测文件类型
filetype plugin on " 按照文件类型加载插件
filetype indent on " 按照文件类型设置缩进
syntax on " 打开语法高亮
set number " 显示行号
set relativenumber " 显示相对行号
set cursorline " 高亮当前行
set cursorcolumn " 高亮当前列
set shiftwidth=4 " 设置位移宽度为4
set tabstop=4 " 设置缩进宽度为4
set expandtab " 将缩进替换为空格
set nobackup " 不生成backup文件
set scrolloff=10 " 设置滚动时始终显示上下10行
set nowrap " 禁止折行
set incsearch " 增量式搜索
set ignorecase " 搜索时大小写不敏感
set smartcase " 搜索时对首字母大小写敏感
set showcmd " 显示键入的命令前缀
set showmode " 显示当前模式(插入、可视等)
set showmatch " 在搜索过程中显示匹配的单词
set hlsearch " 高亮搜索结果
set history=1000 " 设置命令历史记录为1000
set wildmenu " 设置tab补全
set wildmode=list:longest " 使tab补全类似于Bash
set encoding=utf-8 " 设置编码方式为UTF-8