vi 配置

在自己用户目录下配置自己喜欢的VI

终端输入:cd

打开或新建文件:  vi  .vimrc

然后就可以进行文件编辑了,内容和代码命令可以如下:

syntax on “语法高亮显示
filetype indent on “文件自动缩进

set autoindent “使用自动对其,也就是把当前行的对其格式应用到下一行
set smartindent “依据上面的对其格式,智能的选择对其方式

set tabstop=4 “设置tab键为4个空格
set shiftwidth=4 “设置当前行之间交错时使用4个空格
set enc=utf-8 “设置编码

hi  查看当前所有配色

例子:

hi SpecialKey guifg=Blue

hi MoreMsg guifg=Green

hi Visual guifg=NONE guibg=NONE gui=reverse cterm=reverse

hi Folded ctermbg=4 guibg=Blue

hi link {from-group} {to-group}“关联颜色

colorscheme  配色方案选取

colorscheme evening “设置配色方案
set helplang=cn 中文帮助

原文地址:https://www.cnblogs.com/lovemo1314/p/2106096.html