vim考场配置

syntax on
set ruler
"" 开启行号
set nu

"" 调整缩进
set autoindent
set cindent
set ts=4
set shiftwidth=4
set softtabstop=4

"" 搜索高亮
set hlsearch

"" 括号配对
inoremap { {}<ESC>i
inoremap ( ()<ESC>i
inoremap [ []<ESC>i

"" 符号配对
inoremap " ""<ESC>i
inoremap ' ''<ESC>i

""一键编译/运行
map <F5> <ESC>:w<CR>:!clear&&g++ "%" -o "%<" -g -lm -Wall -std=c++11<CR>
map <F6> <ESC>:w<CR>:!clear&&time "./%<"<CR>
posted @ 2020-10-23 16:30  Zesty_Fox  阅读(162)  评论(0编辑  收藏  举报