码迷,mamicode.com
首页 > 系统相关 > 详细

vim配置

时间:2019-08-07 14:36:39      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:pac   erro   rap   exe   tabs   gb2312   abs   undo   amp   


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

 


 

vim配置

标签:pac   erro   rap   exe   tabs   gb2312   abs   undo   amp   

原文地址:https://www.cnblogs.com/frankhuang/p/11315027.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!