我的考场vimrc的配置

 1 set ruler
 2 set number
 3 set mouse=a
 4 set tabstop=4
 5 set shiftwidth=4
 6 set softtabstop=4
 7 
 8 set wrap
 9 set smarttab
10 set smartindent
11 set autoindent
12 set linebreak
13 
14 set autoread
15 set autochdir
16 set noswapfile
17 set nocompatible
18 
19 set fdm=indent
20 set clipboard=unnamedplus
21 set backspace=indent,eol,start
22 
23 syntax on
24 color default
25 
26 map <F5> :!gdb %< <CR>
27 map <F9> :call Compile()<CR>
28 map <F7> :!./%< <CR>
29 map <F8> :call Compile()<CR> :!./%< <CR>
30 
31 imap <F5> <Esc>:!gdb %< <CR>
32 imap <F9> <Esc>:call Compile()<CR>
33 imap <F7> <Esc>:!./%< <CR>
34 imap <F8> <Esc>:call Compile()<CR>:!./%< <CR>
35 
36 function! Compile()
37     exec "w"
38     exec "!g++ % -o %< -Wall -Wextra -Wshadow"
39 endfunction

 

posted @ 2017-04-13 20:34  Miao_miao  阅读(151)  评论(0编辑  收藏  举报