我的vimrc

syntax on "开启高亮
set background=light "背景
set showcmd  " 显示命令
set mouse=a
set selection=exclusive
set selectmode=mouse,key
set nu "显示行号
set nocp "不兼容模式
set cursorline "线
set tabstop=4               " 设定 tab 长度为 4
set autoindent "自动缩进
set softtabstop=4 " 使得按退格键时可以一次删掉 4 个空格
set shiftwidth=4
set backspace=2 "退格 
set whichwrap+=<,>,h,l "使用方向键
set noerrorbells "关闭bibi声
imap <F9> <ESC>:exec "w"<CR>:exec "!g++ % -o %< -g -lm -static -Wall"<CR>
imap <F5> <ESC>:exec "w"<CR>:exec "!%:p:r"<CR>
imap <F7> <ESC>:exec "w"<CR>:exec "!gdb %<"<CR>
map <F9> <ESC>:exec "w"<CR>:exec "!g++ % -o %< -g -lm -static -Wall"<CR>

你可能感兴趣的:(vim)