" 显示行号
set nu
" 语法高亮
syntax on
"去掉vi一致性模式
set nocompatible
"vim配色
colorscheme ron
"映射全选+复制 ctrl+a
map <C-A> ggVGY
map! <C-A> <Esc>ggVGY
map <F12> gg=G
"选中状态下 Ctrl+c 复制
vmap <C-c> "+y
"去空行
nnoremap <F2> :g/^\s*$/d<CR>
"代码补全
set completeopt=preview,menu
"去掉输入错误的提示声音
set noeb
"自动缩进
set autoindent
set cindent
"统一缩进为4
set softtabstop=4
set shiftwidth=4
"Tab键的宽度
set tabstop=4
"不要用空格代替制表符
set noexpandtab
"使用鼠标
set mouse=a
set selection=exclusive
set selectmode=mouse,key
"为C程序提供自动缩进
set smartindent
"backspace删除
set backspace=2