set nocompatible
source $VIMRUNTIME/vimrc_example.vim
set nu
"设置编码
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("win32")
set fileencoding=chinese
else
set fileencoding=utf-8
endif
"解决菜单乱码
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"解决console输出乱码
language messages zh_CN.utf-8
set termencoding=chinese
"set fileencodings=utf-8,ucs-bom,chinese
"语言设置
set langmenu=zh_CN.UTF-8
"设置语法高亮
syntax enable
syntax on
filetype on
filetype plugin on
filetype plugin indent on
set nobackup
set autoindent
set smartindent
set cindent
set expandtab
set shiftwidth=4 " 设定 << 和 >> 命令移动时的宽度为 4
set softtabstop=4 " 使得按退格键时可以一次删掉 4 个空格
set tabstop=4 " 设定 tab 长度为 5
set lines=50
set columns=120
color cbjcolor
set guifont=consolas:h11
set guifontwide=楷体:h12
vim配置文件,新版
最新推荐文章于 2023-02-16 00:02:54 发布