vim配置

淺唱寂寞╮ 提交于 2019-11-27 03:20:48

'''
colorscheme desert
set guifont=Consolas:h11
set tabstop=4
set expandtab
set shiftwidth=4
set nowrap

set noswapfile
set nobackup
set noundofile

set nohlsearch
set incsearch

set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set nu
set guioptions-=T
set cindent
set nocompatible
set history=100
set confirm
set clipboard+=unnamed
filetype on
filetype indent on
syntax on
set backspace=2
set whichwrap+=<,>,h,l
set shortmess=atI
set report=0
set noerrorbells
set showmatch

map <F5> :call CompileRunGcc()<CR>
func! CompileRunGcc()
 exec "w"
 if &filetype == 'c'
"linux
exec '!g++ % -o %<'
exec '!time ./%<'
"windows
" exec '!g++ % -o %<'
" exec '!%<.exe'
elseif &filetype == 'cpp'
exec '!g++ % -o %<'
exec '!time ./%<'
elseif &filetype == 'python'
exec '!time python %'
elseif &filetype == 'sh'
:!time bash %
endif
endfunc
'''

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!