"colorscheme "background color
colorscheme desert
"auto syntax "syntax highlighting
syntax on
"line number
set nu
set number
"column and line cursor
set cursorline
set cursorcolumn
set hlsearch "shift+* highlight
"Tab auto completion
function! CleverTab()
if strpart( getline('.'),0,col('.')-1) =~'^\s*$'
return "\<Tab>"
else
return"\<C-N>"
endif
endfunction
inoremap <Tab> <C-R>=CleverTab()<CR>
"Font type and size
"set guifont=monospace\ 13 if use linux system set this one,if windows,set
"below one
set guifont=Consolas:h16:cGB2312
"syntax match
set showmatch "括号匹配
set matchtime=2
"indent
set smartindent
set autoindent "自动缩进 继承前一行的缩进方式,适用于多行注释
"cursor state 显示光标列数
set ruler
"Fold method, foldenable
set foldenable
set foldmethod=marker
set foldmethod=manual 手动折叠
"disable cursor blinking 禁止光标闪烁
set gcr=a:blinkon0
"输入的命令显示出来,看的清楚些
set showcmd
"设置Tab长度为2空格
set tabstop=2
"设置自动缩进长度为2空格
set shiftwidth=2
"language 支持中文不乱码
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
"filetype, 'indent on' is necessary for smartindent 侦测文件类型
filetype on
gvim配置
于 2023-09-19 10:11:29 首次发布