Vim 文件配置
Posted spider-spiders
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Vim 文件配置相关的知识,希望对你有一定的参考价值。
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