下面这个是精简版本 主要是一键运行 显示行号等简单的 不用安装扩展的
%s/^M//gc
:set fileformat=unix
"文件目录插件 let g:winManagerWindowLayout = "FileExplorer" set backspace=2 map <C-n> :NERDTreeToggle<CR> autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif set number """"""""""" "Quickly Run 一键执行脚本 对应不同的文件类型 执行不同的脚本 """"""""""" filetype on map <C-R> :call ComplieRunGcc()<CR> func! ComplieRunGcc() exec "w" "exec "!clear" if &filetype == 'python' exec "!time python3 %" elseif &filetype == 'py' exec "!time python3 %" elseif &filetype == 'php' exec "!time php %" elseif &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 == 'go' "exec "!go build %<" exec "!time go run %" elseif &filetype == 'html' exec "!chrome % &" elseif &filetype == 'mkd' exec "!~/.vim/markdown.pl % > %.html &" exec "!chrome %.html &" endif endfunc "map <C-T> :w<cr>:!python %<cr> "map <C-P> :w<cr>:!php %<cr> set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 set termencoding=utf-8 set encoding=utf-8
vimrc 点击下载原文件