通过修改~/.vimrc文件来配置vim的基本功能
"--------------display-----------------
set nu "行号
syntax on "语法高亮
set ruler "显示当前行和列
set showcmd "显示部分命令
set showmode "最后一行显示当前模式
set match "显示括号匹配
"--------------display-----------------
"---------------input------------------
set smartindent "自动缩进
set expandtab "将tab转化为空格
set smarttab "插入tab使用shiftwidth
set shiftwidth=4 "缩进列数为4
"---------------input------------------
"---------------search-----------------
set hlsearch "搜索结果高亮显示
set inccase "预览搜索结果
set ignorecase "不区分大小写
set smartcase "当有大写字母时区分大小写
"---------------search-----------------
"---------------encoding----------------
set encoding=utf-8 "设置编码格式
set fileencodings=utf-8,gb18030,gbk,gb2312,big5
set termencoding=utf-8
欢迎关注我的微信公众号,公众号有更多vim的学习笔记。