http://blog.csdn.net/g_brightboy/article/details/14229139
#tips:(ycm没有生效)肯是自带的jedi-vim,备注以后研究
xdebug和DBGPavim没有生效。
" An example for a vimrc file.
" author holen" data 2016-6" Use Vim settings, rather than Vi settings (much better!)." This must be first, because it changes other options as a side effect.set nocompatible" allow backspacing over everything in insert modeset backspace=indent,eol,startset history=50 " keep 50 lines of command line historyset ruler " show the cursor position all the timeset showcmd " display incomplete commandsset incsearch " do incremental searching" In many terminal emulators the mouse works just fine, thus enable it.set mouse=a" Switch syntax highlighting on, when the terminal has colors" Also switch on highlighting the last used search pattern.if &t_Co > 2 || has("gui_running")syntax onset hlsearchset incsearchendif" folder code settingset foldmethod=indentau BufWinLeave * silent mkviewau BufRead * silent loadviewnnoremap <space> za" detection filetypefiletype off" loading filetype plugin"filetype plugin on" load indent files, to automatically do language-dependent indenting." filetype indent on" python utomatic insufficiency":inoremap ( ()<ESC>i":inoremap ) <c-r>=ClosePair(')')<CR>":inoremap { {}<ESC>i":inoremap } <c-r>=ClosePair('}')<CR>":inoremap [ []<ESC>i"":inoremap ] <c-r>=ClosePair(']')<CR>"":inoremap " ""<ESC>i"":inoremap ' ''<ESC>ifunction! ClosePair(char) if getline(".")[col('.')-1] == a:char return "\<Right>" else return a:char endifendfunction" auto add file headerautocmd BufNewFile *.py 0r ~/.vim/.vim_head_template/vim_pythonautocmd BufNewFile *.py ks|call FileName()|'sautocmd BufNewFile *.py ks|call CreatedTime()|'sautocmd BufNewFile * normal Gfun FileName() if line("$") > 10 let l = 10 else let l = line("$") endif exe "1,".l."g/File Name:.*/s/File Name:.*/File Name: ".expand("%")endfun fun CreatedTime() if line("$") > 10 let l = 10 else let l = line("$") endif exe "1,".l."g/Created Time:.*/s/Created Time:.*/Created Time: ".strftime("%Y-%m-%d %T")endfun" other general settingsset nuwinpos 225 225set lines=35 columns=115colo peachpuffset autoindent " set guifont=Lucida_Console:h12set tabstop=4set shiftwidth=4set autoindentset showmatchset autowriteset magicset confirmset history=500set noswapfileset whichwrap+=<,>,h,lset clipboard+=unnamedset pastetoggle +=<F9>set noautoindentset nosmartindentset nocindent"allow folderset foldenableset foldmethod=manual" set encodeset encoding=utf-8set fileencoding=utf-8set fileencodings=ucs-bom,utf-8,GB18030,cp936,big5,euc-jp,euc-kr,latin1"" moved window mappingnmap <C-H> <C-W>h nmap <C-J> <C-W>jnmap <C-K> <C-W>knmap <C-L> <C-W>l" Keyboard mapping" None" vundle Plug-in settings" filetype off " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/vundle/call vundle#rc()" let Vundle manage Vundle, required" original repos on github(On Github repository site non-vim-scripts plugins)" Bundle 'tpope/vim-fugitive'" vim-scripts repos(vim-scripts plugins)" Bundle 'FuzzyFinder' " other" Bundle 'git://git.wincent.com/command-t.git'" folder viewsBundle 'scrooloose/nerdtree.git'" html and cssBundle 'mattn/emmet-vim.git'" code completionBundle 'Valloric/YouCompleteMe'" right tagbarBundle 'majutsushi/tagbar'" Folder code Bundle 'tmhedberg/SimpylFold'" Programming symbol completionBundle 'Raimondi/delimitMate'" comment and cancel commentBundle 'scrooloose/nerdcommenter'" like sourceInsight"Bundle 'wesleyche/SrcExpl'" xdebug Bundle 'xdebug/xdebug'" script language debugBundle 'brookhong/DBGPavim'"YouComplete use jedi to Completion python"Bundle 'davidhalter/jedi-vim'filetype plugin indent onlet NERDTreeWinPos='left'let NERDTreeWinSize=23"let g:NERDTreeDirArrowExpandable = '▸'"let g:NERDTreeDirArrowCollapsible = '▾'"mapping open or close nerdtereemap <silent> <F2> :NERDTreeToggle<CR> " mapping tagbarTogglelet g:tagbar_width = 25map <silent> <F3> :TagbarToggle<CR>" mapping SrcExplToggle"map <silent> <F4> :SrcExplToggle<CR>" Brief help " :BundleList - list configured plugins " :PluginInstall(!) " :BundleSearch(!) foo - search(or refresh cache first) for foo " :BundleInstall (update) plugins " :BundleClean(!) - confirm (or auto-approve) removal of unused" hide .pyclet NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree" setting cscope" cs find c|d|e|g|f|i|s|t name" using cscope to find word where is define,models as below:" find where statementnmap <C-@>s :cs find s <C-R>=expand("<cword>")<CR><CR>" find where definitionnmap <C-@>g :cs find g <C-R>=expand("<cword>")<CR><CR>" find current function calling that function nmap <C-@>d :cs find d <C-R>=expand("<cword>")<CR><CR>" find function that who was calling cur function nmap <C-@>c :cs find c <C-R>=expand("<cword>")<CR><CR>" find current stringnmap <C-@>t :cs find t <C-R>=expand("<cword>")<CR><CR>" egrep modelsnmap <C-@>e :cs find e <C-R>=expand("<cword>")<CR><CR>" find current filenmap <C-@>f :cs find f <C-R>=expand("<cword>")<CR><CR>"find that file who contain current filenmap <C-@>i :cs find i <C-R>=expand("<cword>")<CR><CR>" set debuggerlet g:dbgPavimPort = 9000let g:dbgPavimBreakAtEntry = 0" Ycmlet mapleader = ","let g:mapleader = ","autocmd FileType python set omnifunc=pythoncomplete#Complete autocmd FileType python setlocal completeopt-=previewautocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJS autocmd FileType html set omnifunc=htmlcomplete#CompleteTags autocmd FileType css set omnifunc=csscomplete#CompleteCSS autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags autocmd FileType php set omnifunc=phpcomplete#CompletePHP autocmd FileType c set omnifunc=ccomplete#Complete colorscheme desert