admin 管理员组文章数量: 1184232
2024年3月9日发(作者:fwrite函数的用法链表)
"Version: 1.0 by momodi@whuacm
"Please check the new vertion via
source $VIMRUNTIME/
behave mswin
imap
imap
map o o
imap
noremap
syn on
colo desert
filetype indent on
se ru nu ar sw=4 ts=4 noswf et sta nowrap ww=<,>,[,] gfn=Consolas:h12
autocmd BufEnter * lcd %:p:h
map
map
func CR()
exec 'update'
if filereadable(expand('%<').'.in')
exec '!start cmd /c _run %< < %<.in & pause'
else
exec '!start cmd /c _run %< & pause'
endif
endfunc
map
func SetTitle()
let l = 0
let l = l + 1 | call setline(l, '/*')
let l = l + 1 | call setline(l, ' * Author: ')
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, '#include
let l = l + 1 | call setline(l, '#include
let l = l + 1 | call setline(l, '#include
let l = l + 1 | call setline(l, '#include
let l = l + 1 | call setline(l, '#include
let l = l + 1 | call setline(l, '#include
let l = l + 1 | call setline(l, '#include
let l = l + 1 | call setline(l, 'using namespace std;')
let l = l + 1 | call setline(l, '#define out(v) cerr << #v << ": " << (v) << endl')
let l = l + 1 | call setline(l, '#define SZ(v) ((int)(v).size())')
let l = l + 1 | call setline(l, 'const int maxint = -1u>>1;')
let l = l + 1 | call setline(l, 'template
1: 0;}')
let l = l + 1 | call setline(l, 'template
1: 0;}')
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, '}')
let l = l + 1 | call setline(l, '')
endfunc
map
func AddComment()
if matchstr(getline('.'), '[^ ]') == '/'
normal ^xx
else
normal ^i//
endif
endfunc
" F9 编译
imap
map
func CpSet()
if filereadable(expand('%<').'.exe')
exec '!start cmd /c del %<.exe'
endif
set makeprg=g++ -Wall -o %<.exe %
endfunc
func Run()
if filereadable(expand('%<').'.exe')
if filereadable(expand('%<').'.in')
exec '!start cmd /c %<.exe < %<.in && pause || pause'
else
exec '!start cmd /c %<.exe && pause || pause'
endif
endif
endfunc
版权声明:本文标题:Gvim配置文件 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1709956302a551127.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论