1. Brief description
My Linux is a centos version, which is not much different from other Linux versions.
2. My configuration
It's relatively simple. For the initial use of gvim, I will slowly share a more comprehensive configuration later.
" 语法高亮度显示
syntax on
" 设置行号
set nu
"防止中文注释乱码
set fileencoding=utf-8
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936,big-5
set enc=utf-8
let &termencoding=&encoding
"设置字体
set guifont=Monospace\ 14
" 设置tab4个空格
set tabstop=4
set expandtab
"程序自动缩进时候空格数
set shiftwidth=4
"退格键一次删除4个空格
set softtabstop=4
" 在编辑过程中,在右下角显示光标位置的状态行
set ruler
" 搜索忽略大小写
set ignorecase
" vim使用自动对起,也就是把当前行的对起格式应用到下一行
set autoindent
" 依据上面的对起格式,智能的选择对起方式,对于类似C语言编写上很有用
set smartindent
" 在状态列显示目前所执行的指令
set showcmd
" 设置颜色主题
colorscheme darkblue
set nocompatible
set backspace=indent,eol,start
Note: Only one space after the slash in the font configuration is effective. This is a huge pit, and it took a long time to find out.