1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| syntax on "语法高亮" set number "显示行号" set cursorline "突出显示当前行" set showmatch "括号匹配" set showmode "在底部显示当前模式" set showcmd "命令模式下显示键入的指令" set t_Co=256 "启用256色" set textwidth=80 "设置行宽" set wrap "超过设定行宽时自动换行" "set nowrap" "取消自动换行" set scrolloff=5 "垂直滚动时,光标距离顶部/底部的位置" set laststatus=2 "显示状态栏" set ruler "在状态栏显示光标的当前位置" set wildmenu "输入命令时,Tab键自动补全"
set hlsearch "搜索时,高亮显示匹配结果" set incsearch "搜索时,高亮同步" set ignorecase "搜索时忽略大小写" set smartcase "搜索时智能忽略大小写" set tabstop=4 "Tab长度为4空格" set autoindent "继承前一行的缩进方式" "set expandtab "Tab自动转换为空格" "set softtabstop=4 "自动转换的空格数" set shiftwidth=4 "在文本上按下 >>、<< 或者 == 时,操作的字符数"
"设置自动补全" inoremap ( ()<ESC>i inoremap [ []<ESC>i inoremap { {}<ESC>i "inoremap < <><ESC>i inoremap ' ''<ESC>i inoremap " ""<ESC>i
set mouse=a "支持使用鼠标" set encoding=utf-8 "使用 utf-8 编码"
|