vimrc

set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent

set autoread

colo murphy

set smarttab
set guifont=Courier_new:h15
set nocompatible
set syntax=on 
syntax on
set backspace=indent,eol,start

let g:asyncrun_open = 8


" autocmd GUIEnter * simalt ~x

" if has('win32')    
" 	au GUIEnter * simalt ~x
" else    
"	au GUIEnter * call MaximizeWindow()
" endif 
 
" function! MaximizeWindow()    
" 	silent !wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
" endfunction



" let Tlist_Show_One_File=1  
" let Tlist_Exit_OnlyWindow=1  
" nmap www :TlistToggle<CR>

" set tags=tags;
" set autochdir

" map <silent> <F9> :TlistToggle<CR>

" let g:winManagerWindowLayout = "BufExplorer,FileExplorer|TagList"
" let g:winManagerWidth = 30
" let g:defaultExplorer = 0
" map <c-w><c-f> :FirstExplorerWindow<cr>
" map <c-w><c-b> :BottomExplorerWindow<cr>
" map <c-w><c-t> :WMToggle<cr>


" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1

" Use compact syntax for prettified multi-line comments
let g:NERDCompactSexyComs = 1

" Align line-wise comment delimiters flush left instead of following code indentation
let g:NERDDefaultAlign = 'left'

" Add your own custom formats or override the defaults
let g:NERDCustomDelimiters = { 'c': { 'left': '// ' } }

" Allow commenting and inverting empty lines (useful when commenting a region)
let g:NERDCommentEmptyLines = 1

" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1

" Enable NERDCommenterToggle to check all selected lines is commented or not 
let g:NERDToggleCheckAllLines = 1


nmap <F11> :wa<cr>:TlistUpdate<cr>:FirstExplorerWindow<cr><F5><c-w>b

let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle
let g:rainbow_conf = {
	\	'guifgs': ['seagreen3', 'firebrick', 'lightyellow', 'darkorange3'],
	\	'ctermfgs': ['lightcyan', 'lightmagenta', 'lightyellow', 'lightblue'],
	\	'operators': '_,_',
	\	'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],
	\	'separately': {
	\		'*': {},
	\		'tex': {
	\			'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'],
	\		},
	\		'lisp': {
	\			'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'],
	\		},
	\		'vim': {
	\			'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold', 'start=/(/ end=/)/ containedin=vimFuncBody', 'start=/\[/ end=/\]/ containedin=vimFuncBody', 'start=/{/ end=/}/ fold containedin=vimFuncBody'],
	\		},
	\		'html': {
	\			'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold'],
	\		},
	\		'css': 0,
	\	}
	\}

" if executable("vimtweak.dll") 
" autocmd guienter * call libcallnr("vimtweak","SetAlpha",200) 
" endif 

set nocompatible
set number

set cindent
 
 
set showcmd
 
set nobackup
set noswapfile
 
set mouse=a
 
nmap <c-c> "+y
nmap <c-v> "+gp

map el $
map eb 0

map <F4> :call BZOJ()<CR>
func! BZOJ()
exec "w"
exec "AsyncRun g++ -std=c++98 -g -Wall -Wshadow -Wextra % -o %<"
endfunc

map <F5> :call Debug()<CR>
func! Debug()
exec "w"
exec "AsyncRun g++ -std=c++14 -g % -o %<"
endfunc

map <F6> :call CR()<CR>
func! CR()
exec "w"
exec "AsyncRun g++ -O2 -std=c++14 -Wall -Wextra -Wshadow -Wunreachable-code -Wpointer-arith % -o %<"
endfunc

map <F7> :call CRim()<CR>
func! CRim()
exec "w"
exec "! g++ -O2 -std=c++14 -Wall -Wextra -Wshadow -Wunreachable-code -Wpointer-arith % -o %<"
exec "! %<"
endfunc

map <F8> :call CRun()<CR> 
func! CRun()
exec "! %<"
endfunc

map <C-N> : call CMD()<CR>
func! CMD()
exec "!start cmd.exe"
endfunc

imap <c-]> {<cr>}<c-o>O<left><right>
 
map <C-A> ggVG"+y
 
 
"inoremap ( ()<LEFT>
"inoremap [ []<LEFT>
"inoremap { {}<LEFT>
"inoremap " ""<LEFT>
"inoremap ' ''<LEFT>
 
 
map <F2> :call SetTitle3()<CR>
func SetTitle3()
let l = 0
let l = l + 1 | call setline(l,'/* ***********************************************')
let l = l + 1 | call setline(l,'Author        :BPM136')
let l = l + 1 | call setline(l,'Created Time  :'.strftime('%c'))
let l = l + 1 | call setline(l,'File Name     :'.expand('%'))
let l = l + 1 | call setline(l,'************************************************ */')
let l = l + 1 | call setline(l,'')

let l = l + 1 | call setline(l,'#include<iostream>')
let l = l + 1 | call setline(l,'#include<cstdio>')
let l = l + 1 | call setline(l,'#include<algorithm>')
let l = l + 1 | call setline(l,'#include<cstdlib>')
let l = l + 1 | call setline(l,'#include<cmath>')
let l = l + 1 | call setline(l,'#include<cstring>')
let l = l + 1 | call setline(l,'#include<iomanip>')
let l = l + 1 | call setline(l,'#include<bitset>')
let l = l + 1 | call setline(l,'#include<queue>')
let l = l + 1 | call setline(l,'#include<ctime>')
let l = l + 1 | call setline(l,'#include<set>')
let l = l + 1 | call setline(l,'#include<map>')
let l = l + 1 | call setline(l,'#include<list>')
let l = l + 1 | call setline(l,'#include<vector>')
let l = l + 1 | call setline(l,'#include<cassert>')
let l = l + 1 | call setline(l,'#include<functional>')
let l = l + 1 | call setline(l,'#include<string>')
let l = l + 1 | call setline(l,'#include<cinttypes>')
let l = l + 1 | call setline(l,'#include<cstdint>')
let l = l + 1 | call setline(l,'#include<array>')
let l = l + 1 | call setline(l,'#define SZ(x) ((int)(x).size())')
let l = l + 1 | call setline(l,'#define all(x) (x).begin(),(x).end()')
let l = l + 1 | call setline(l,'#define filein(x) freopen(#x".in","r",stdin)')
let l = l + 1 | call setline(l,'#define fileout(x) freopen(#x".out","w",stdout)')
let l = l + 1 | call setline(l,'#define file(x) freopen(#x".in","r",stdin),freopen(#x".out","w",stdout);')
let l = l + 1 | call setline(l,'#define mkd(x) freopen(#x".in","w",stdout);')
let l = l + 1 | call setline(l,'#define setlargestack(x) int _SIZE=x<<20;char *_PPP=(char*)malloc(_SIZE)+_SIZE;__asm__("movl %0, %%esp\n" :: "r"(_PPP));')
let l = l + 1 | call setline(l,'#define read2(a,b) read(a),read(b)')
let l = l + 1 | call setline(l,'#define read3(a,b,c) read(a),read(b),read(c)')
let l = l + 1 | call setline(l,'#define readg(_x1,_y1,_x2,_y2) read(_x1),read(_y1),read(_x2),read(_y2)')
let l = l + 1 | call setline(l,'#define USE_CIN_COUT ios::sync_with_stdio(0)')
let l = l + 1 | call setline(l,'')
let l = l + 1 | call setline(l,'using namespace std;')
let l = l + 1 | call setline(l,'')
let l = l + 1 | call setline(l,'typedef long long ll;')
let l = l + 1 | call setline(l,'typedef double db;')
let l = l + 1 | call setline(l,'typedef long double ld;')
let l = l + 1 | call setline(l,'typedef unsigned int  ui;')
let l = l + 1 | call setline(l,'typedef unsigned long long ull;')
let l = l + 1 | call setline(l,'')
let l = l + 1 | call setline(l,'namespace fastIO{  ')
let l = l + 1 | call setline(l,'    #define BUF_SIZE 100000  ')
let l = l + 1 | call setline(l,'    #define OUT_SIZE 100000  ')
let l = l + 1 | call setline(l,'    //fread->read  ')
let l = l + 1 | call setline(l,'    bool IOerror=0;  ')
let l = l + 1 | call setline(l,'    inline char nc(){  ')
let l = l + 1 | call setline(l,'		static char buf[BUF_SIZE],*p1=buf+BUF_SIZE,*pend=buf+BUF_SIZE;  ')
let l = l + 1 | call setline(l,'		if (p1==pend){  ')
let l = l + 1 | call setline(l,'			p1=buf; pend=buf+fread(buf,1,BUF_SIZE,stdin);  ')
let l = l + 1 | call setline(l,'			if (pend==p1){IOerror=1;return -1;}  ')
let l = l + 1 | call setline(l,'			//{printf("IO error!\n");system("pause");for (;;);exit(0);}  ')
let l = l + 1 | call setline(l,'		}  ')
let l = l + 1 | call setline(l,'		return *p1++;  ')
let l = l + 1 | call setline(l,'	}  ')
let l = l + 1 | call setline(l,'	inline bool blank(char ch){return ch==32||ch==10||ch==13||ch==9;}  ')
let l = l + 1 | call setline(l,'	inline bool enter(char ch){return ch==10||ch==13;}')
let l = l + 1 | call setline(l,'	inline void read(int &x){  ')
let l = l + 1 | call setline(l,'		bool sign=0; char ch=nc(); x=0;  ')
let l = l + 1 | call setline(l,'		for (;blank(ch);ch=nc());  ')
let l = l + 1 | call setline(l,'		if (IOerror)return;  ')
let l = l + 1 | call setline(l,'		if (ch==45)sign=1,ch=nc();  ')
let l = l + 1 | call setline(l,'		for (;ch>=48&&ch<=57;ch=nc())x=x*10+ch-48;  ')
let l = l + 1 | call setline(l,'		if (sign)x=-x;  ')
let l = l + 1 | call setline(l,'	}  ')
let l = l + 1 | call setline(l,'	inline void read(ll &x){  ')
let l = l + 1 | call setline(l,'		bool sign=0; char ch=nc(); x=0;  ')
let l = l + 1 | call setline(l,'		for (;blank(ch);ch=nc());  ')
let l = l + 1 | call setline(l,'		if (IOerror)return;  ')
let l = l + 1 | call setline(l,'		if (ch==45)sign=1,ch=nc();  ')
let l = l + 1 | call setline(l,'		for (;ch>=48&&ch<=57;ch=nc())x=x*10+ch-48;  ')
let l = l + 1 | call setline(l,'		if (sign)x=-x;  ')
let l = l + 1 | call setline(l,'	}  ')
let l = l + 1 | call setline(l,'	inline void read(double &x){  ')
let l = l + 1 | call setline(l,'		bool sign=0; char ch=nc(); x=0;  ')
let l = l + 1 | call setline(l,'		for (;blank(ch);ch=nc());  ')
let l = l + 1 | call setline(l,'		if (IOerror)return;  ')
let l = l + 1 | call setline(l,'		if (ch==45)sign=1,ch=nc();  ')
let l = l + 1 | call setline(l,'		for (;ch>=48&&ch<=57;ch=nc())x=x*10+ch-48;  ')
let l = l + 1 | call setline(l,'		if (ch==46){  ')
let l = l + 1 | call setline(l,'			double tmp=1; ch=nc();  ')
let l = l + 1 | call setline(l,'			for (;ch>=48&&ch<=57;ch=nc())tmp/=10.0,x+=tmp*(ch-48);  ')
let l = l + 1 | call setline(l,'		}  ')
let l = l + 1 | call setline(l,'		if (sign)x=-x;  ')
let l = l + 1 | call setline(l,'	}  ')
let l = l + 1 | call setline(l,'	inline void read(char *s){  ')
let l = l + 1 | call setline(l,'		char ch=nc();  ')
let l = l + 1 | call setline(l,'		for (;blank(ch);ch=nc());  ')
let l = l + 1 | call setline(l,'		if (IOerror)return;  ')
let l = l + 1 | call setline(l,'		for (;!blank(ch)&&!IOerror;ch=nc())*s++=ch;  ')
let l = l + 1 | call setline(l,'		*s=0;  ')
let l = l + 1 | call setline(l,'	}  ')
let l = l + 1 | call setline(l,'	inline void readln(char *s) {')
let l = l + 1 | call setline(l,'		char ch=nc();')
let l = l + 1 | call setline(l,'		for (;blank(ch);ch=nc());')
let l = l + 1 | call setline(l,'		if(IOerror)return;')
let l = l + 1 | call setline(l,'		for(;!enter(ch)&&!IOerror;ch=nc())*s++=ch;')
let l = l + 1 | call setline(l,'		*s=0;')
let l = l + 1 | call setline(l,'	}')
let l = l + 1 | call setline(l,'	inline void read(char &c){  ')
let l = l + 1 | call setline(l,'		for (c=nc();blank(c);c=nc());  ')
let l = l + 1 | call setline(l,'		if (IOerror){c=-1;return;}  ')
let l = l + 1 | call setline(l,'	} ')
let l = l + 1 | call setline(l,'#undef OUT_SIZE  ')
let l = l + 1 | call setline(l,'#undef BUF_SIZE  ')
let l = l + 1 | call setline(l,'}')
let l = l + 1 | call setline(l,'')
let l = l + 1 | call setline(l,'int main() {')
let l = l + 1 | call setline(l,'	return 0;')
let l = l + 1 | call setline(l,'}')
endfunc


map <F3> :call SetTitle4()<CR>
func SetTitle4()
let l = 0
let l = l + 1 | call setline(l,'/* ***********************************************')
let l = l + 1 | call setline(l,'Author        :BPM136')
let l = l + 1 | call setline(l,'Created Time  :'.strftime('%c'))
let l = l + 1 | call setline(l,'File Name     :'.expand('%'))
let l = l + 1 | call setline(l,'************************************************ */')
let l = l + 1 | call setline(l,'')
 
let l = l + 1 | call setline(l,'#include<iostream>')
let l = l + 1 | call setline(l,'#include<cstdio>')
let l = l + 1 | call setline(l,'#include<algorithm>')
let l = l + 1 | call setline(l,'#include<cstdlib>')
let l = l + 1 | call setline(l,'#include<cmath>')
let l = l + 1 | call setline(l,'#include<cstring>')
let l = l + 1 | call setline(l,'#include<iomanip>')
let l = l + 1 | call setline(l,'#include<bitset>')
let l = l + 1 | call setline(l,'#include<queue>')
let l = l + 1 | call setline(l,'#include<ctime>')
let l = l + 1 | call setline(l,'#include<set>')
let l = l + 1 | call setline(l,'#include<map>')
let l = l + 1 | call setline(l,'#include<list>')
let l = l + 1 | call setline(l,'#include<vector>')
let l = l + 1 | call setline(l,'#include<cassert>')
let l = l + 1 | call setline(l,'#include<string>')
let l = l + 1 | call setline(l,'#include<cinttypes>')
let l = l + 1 | call setline(l,'#include<cstdint>')
let l = l + 1 | call setline(l,'#include<array>')
let l = l + 1 | call setline(l,'#define SZ(x) ((int)(x).size())')
let l = l + 1 | call setline(l,'#define all(x) (x).begin(),(x).end()')
let l = l + 1 | call setline(l,'#define USE_CIN_COUT ios::sync_with_stdio(0)')
let l = l + 1 | call setline(l,'')
let l = l + 1 | call setline(l,'using namespace std;')
let l = l + 1 | call setline(l,'')
let l = l + 1 | call setline(l,'typedef long long ll;')
let l = l + 1 | call setline(l,'typedef double db;')
let l = l + 1 | call setline(l,'typedef long double ld;')
let l = l + 1 | call setline(l,'typedef unsigned int ui;')
let l = l + 1 | call setline(l,'typedef unsigned long long ull;')
let l = l + 1 | call setline(l,'')
let l = l + 1 | call setline(l,'int main() {')
let l = l + 1 | call setline(l,'    return 0;')
let l = l + 1 | call setline(l,'}')
endfunc


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值