保捱科技网
您的当前位置:首页linux的Gvim配置文件

linux的Gvim配置文件

来源:保捱科技网
打开Vim的启动设定,然后复制下面的代码并保存即可

\"Vim for linux

source $VIMRUNTIME/mswin.vim

behave mswin

imap dd

imap

map o o

imap {}O

noremap =a{

syn on

colo desert

\"colo torte

filetype indent on

set gfn=Courier\\ 10\\ Pitch\\ 12

set ru nu et sta nowrap ar acd ww=<,>,[,] sw=4 ts=4 cin noswf

\"se ru nu ar sw=4 ts=4 noswf et sta nowrap ww=<,>,[,] gfn=Consolas:h12

autocmd BufEnter * lcd %:p:h

map :tabnew

map :call CR()

func CR()

exec \"update\"

exec \"!xterm -fn 10*20 -e \\\"g++ %<.cpp -Wall -o %< && time ./%< < %<.in ; read -n 1\\\"\"

endfunc

map :call CR2()

func CR2()

exec \"update\"

exec \"!xterm -fn 10*20 -e \\\"g++ %<.cpp -Wall -o %< && time ./%< ; read -n 1\\\"\"

endfunc

map :call SetTitle()Gkkk

func SetTitle()

let l = 0

let l = l + 1 | call setline(l, '/*')

let l = l + 1 | call setline(l, ' * Author: mybestwishes')

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, '#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, '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 :call AddComment()

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

因篇幅问题不能全部显示,请点此查看更多更全内容