Search My Life

Search and Break
随笔 - 4, 文章 - 0, 评论 - 3, 引用 - 0
数据加载中……

I solve only one problem during this night.

What a pity!

posted on 2007-08-17 21:04 whummd 阅读(236) 评论(1)  编辑 收藏 引用

评论

# re: I solve only one problem during this night.  回复  更多评论   

My Vimrc file for ACM/ICPC
"CopyRight: mmd@WhuGCC
behave mswin
vnoremap <C-X> "+x
vnoremap <C-C> "+y
map <C-V> "+gP
cmap <C-V> <C-R>+
exe 'inoremap <script> <C-V>' paste#paste_cmd['i']
exe 'vnoremap <script> <C-V>' paste#paste_cmd['v']
noremap <C-S> :update<CR>
inoremap <C-S> <C-O>:update<CR>
noremap <C-A> gggH<C-O>G
inoremap <C-A> <C-O>gg<C-O>gH<C-O>G
inoremap <C-D> <C-O>dd
noremap <C-Z> u
inoremap <C-Z> <C-O>u
map <F3> 0i//<C-C>
map <F4> ^xx
inoremap <CR> <CR><space><bs>
nnoremap o o<space><bs>
nnoremap O O<space><bs>
noremap <F6> =a{
inoremap { {<c-c>==+?{<cr>a
inoremap } }<c-c>==+?}<cr>a
au GUIEnter * simalt ~x
cd E:\mmd
syn on
colo torte
se lines=80 co=160 cb+=unnamed nu sw=4 ts=4 nobk cin nocp mouse=a bs=2 hi=50 gfn=Courier_New:h12:cANSI
map <c-t> :tabnew<CR>
map <tab> :tabn<CR>
map <s-tab> :tabp<CR>
map <c-w> :close<cr>
map <F9> :call CR()<CR>
func CR()
exec "w"
exec "!start cmd /c g++ %<.cpp -o %<.exe & pause & %<.exe < %<.in & pause"
endfunc
map <F10> :call CR2()<CR>
func CR2()
exec "w"
exec "!start cmd /c g++ %<.cpp -o %<.exe & pause & %<.exe & pause"
endfunc
inoremap <F5> <C-C>:call SetTitle()<CR> GkkO
map <F5> :call SetTitle()<CR> GkkO
func SetTitle()
call setline(1, "/*************************************************************************")
call append(line("."), "Author: WHU_GCC")
call append(line(".")+1, "Created Time: ".strftime("%c"))
call append(line(".")+2, "File Name: ".expand("%"))
call append(line(".")+3, "Description: ")
call append(line(".")+4, "************************************************************************/")
call append(line(".")+5, "#include <iostream>")
call append(line(".")+6, "using namespace std;")
call append(line(".")+7, "#define out(x) (cout<<#x<<\": \"<<x<<endl)")
call append(line(".")+8, "const int maxint=0x7FFFFFFF;")
call append(line(".")+9, "typedef long long int64;")
call append(line(".")+10, "const int64 maxint64 = 0x7FFFFFFFFFFFFFFFLL;")
call append(line(".")+11, "template<class T>void show(T a, int n){for(int i=0; i<n; ++i) cout<<a[i]<<' '; cout<<endl;}")
call append(line(".")+12, "template<class T>void show(T a, int r, int l){for(int i=0; i<r; ++i)show(a[i],l);cout<<endl;}")
call append(line(".")+13, "int main()")
call append(line(".")+14, "{")
call append(line(".")+15, " return 0;")
call append(line(".")+16, "}")
call append(line(".")+17, "")
endfunc




There are a lot of shortcut key for vim in windows.
I belive that you'll love it after you understand what I seted.

There is a bug while you want to insert charact '{' or '}', but I can't solve it.
If you can understand that bug and solved it , please send a e-mail to me.
e-mail:whummd@qq.com
2007-09-06 00:01 | whummd

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理