vimrc

syntax on
set mouse=a
set cindent
set autoindent
set smartindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set backspace=2
set autoread
set nobackup
set ruler
set guifont=Menlo:h15
set whichwrap=b,s,<,>,[,]
set completeopt=preview,menu 
filetype plugin on
map <F9> <Esc>:w<CR> :!g++ % -o %< -Wall -Wextra -Wshadow && ./%< <CR>
imap <F9> <Esc>:w<CR> :!g++ % -o %< -Wall -Wextra -Wshadow && ./%< <CR>

map <F4> <Esc>:vsp %<.out <CR>:split %<.in <CR>
imap<F4> <Esc>:vsp %<.out <CR>:split %<.in <CR>

if !exists("*SetTitlea")
map <F8> :call SetTitlea()<CR>
func SetTitlea()
let l = 0
let l = l + 1 | call setline(l,'/************************************************')
let l = l + 1 | call setline(l,'*Author        :  lrj124')
let l = l + 1 | call setline(l,'*Created Time  :  '.strftime("20%y.%m.%d.%H:%M"))
let l = l + 1 | call setline(l,'*Mail          :  1584634848@qq.com')
let l = l + 1 | call setline(l,'*Problem       :  '.expand("%:r"))
let l = l + 1 | call setline(l,'************************************************/')
let l = l + 1 | call setline(l,'#include <bits/stdc++.h>')
let l = l + 1 | call setline(l,'using namespace std;')
let l = l + 1 | call setline(l,'')
let l = l + 1 | call setline(l,'int main() {')
let l = l + 1 | call setline(l,'    freopen("'.expand("%:r").'.in","r",stdin);')
let l = l + 1 | call setline(l,'    freopen("'.expand("%:r").'.out","w",stdout);')
let l = l + 1 | call setline(l,'    ')
let l = l + 1 | call setline(l,'    cerr << 1.0*clock()/CLOCKS_PER_SEC << endl;')
let l = l + 1 | call setline(l,'    return 0;')
let l = l + 1 | call setline(l,'}')
endfunc
endif

map <c-V> "+gp
map! <c-V> <Esc>"+gp

map <c-C> "+y
map!<c-C> <Esc>"+y

map <c-Z> u
map! <c-Z> <Esc>u

map <C-A> ggVG
map! <C-A> <Esc>ggVG

vnoremap <C-x> "+x
posted @ 2018-11-06 17:33 lrj124 阅读(...) 评论(...) 编辑 收藏

Contact with me