let l = l + 1 | call setline(l, '#include <stack>')
let l = l + 1 | call setline(l, '#include <queue>')
let l = l + 1 | call setline(l, '#include <set>')
let l = l + 1 | call setline(l, '#include <time.h>')
let l = l + 1 | call setline(l, 'using namespace std;')
let l = l + 1 | call setline(l, 'const int maxint = -1u>>1;')
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<f4> :call AddComment()<cr>
func AddComment()
if (getline('.')[0] == '/')
normal ^xx
else
normal 0i//
endif
endfunc
set printoptions=syntax:n,number:y,portrait:y
set guioptions+=b
set encoding=utf-8
set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1
set termencoding=utf-8
上面的_vimrc配置文件可以根据自己的需求添加和删除相应的内容。
在Windows平台上,是按[F9]编译并执行; 在Linux平台上,是按[F9]或[F10]执行,一个是带输入文件,一个是不带输入文件。
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-36207-4.html
这样做反而让人感到反感
收二手家电者的广告词