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

Vim 文件配置

时间:2018-07-02 17:15:38      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:path   nbsp   check   coding   encoding   call   lag   pil   auto   

cat ~/.vimrc
syntax on
set nu
set encoding=utf-8
set ts=4
set fileencodings=ucs-bom,utf-8,cp936
set fileencoding=gb2312
set termencoding=utf-8

"""""""""""""""""""""" "Quickly Run """"""""""""""""""""""
map <F5> :call CompileRunGcc()<CR>
func! CompileRunGcc()
        exec "w"
        if &filetype == ‘c‘
                exec "!g++ % -o %<"
                exec "!time ./%<"
        elseif &filetype == ‘cpp‘
                exec "!g++ % -o %<"
                exec "!time ./%<"
        elseif &filetype == ‘java‘
                exec "!javac %"
                exec "!time java %<"
        elseif &filetype == ‘sh‘
                :!time bash %
        elseif &filetype == ‘python‘
                exec "!time python2.7 %"
        elseif &filetype == ‘html‘
                exec "!firefox % &"
        elseif &filetype == ‘go‘
                " exec "!go build %<"
                exec "!time go run %"
        elseif &filetype == ‘mkd‘
                exec "!~/.vim/markdown.pl % > %.html &"
                exec "!firefox %.html &"
        endif
endfunc
"""""""""""syntastic""""""""""""""""
execute pathogen#infect()
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

 

Vim 文件配置

标签:path   nbsp   check   coding   encoding   call   lag   pil   auto   

原文地址:https://www.cnblogs.com/Spider-spiders/p/9254633.html

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