配置文件为
" autoload _vimrc
autocmd! bufwritepost _vimrc source %" disable VI's compatible modeset nocompatibleset fileencodings=ucs-bom,utf-8,chineseset fileencoding=utf-8" use chinese helpset helplang=cnif has("gui_running")set guifont=Yahei_Mono:h11:cGB2312colorscheme oceandeependif" Enable syntax highlightsyntax enable" Show line numberset nu" show matching bracetsset showmatch" Basic editing optionsset expandtabset shiftwidth=2au FileType html,python,vim,javascript setl shiftwidth=2au FileType html,python,vim,javascript setl tabstop=2au FileType java,php setl shiftwidth=2au FileType java,php setl tabstop=2set smarttabset lbrset tw=0"Auto indentset ai" Smart indetset si" C-style indetingset cindent"Wrap linesset wrap" Sets how many lines of history VIM har to rememberset history=400" Set to auto read when a file is changed from the outsideset autoread" Have the mouse enabled all the time:set mouse=a" Do not redraw, when running macros.. lazyredrawset lz" set 7 lines to the curors - when moving vertical..set so=7" The commandbar is 2 highset cmdheight=2" Change buffer - without savingset hid" Ignore case when searching" set ignorecaseset incsearch" Set magic onset magic" No sound on errors.set noerrorbellsset novisualbellset t_vb=" How many tenths of a second to blinkset mat=4" Highlight search thingsset hlsearch" Turn backup offset nobackupset nowbset noswapfile" smart backspaceset backspace=start,indent,eol" switch buffers with Tabmap <C-Tab> :bn<CR>map <S-Tab> :bp<CR>" NERDTreelet NERDTreeBookmarksFile='d:\Vim\vimfiles\bookmarks.txt'let NERDTreeShowLineNumbers=1let NERDChristmasTree=1let NERDTreeAutoCenter=1let NERDTreeShowBookmarks=0let NERDTreeWinPos='left'let NERDTreeChDirMode=1let NERDTreeStatusline = 1let NERDTreeChDirMode = 1map <C-t> :NERDTreeToggle <C-R>=""<CR>map <C-g> :cs find g <C-R>=expand("<cword>")<CR>" taglistlet Tlist_Auto_Highlight_Tag = 1let Tlist_Auto_Open = 1let Tlist_Auto_Update = 1let Tlist_Close_On_Select = 0let Tlist_Compact_Format = 0let Tlist_Display_Prototype = 0let Tlist_File_Fold_Auto_Close = 0let Tlist_GainFocus_On_ToggleOpen = 1let Tlist_Hightlight_Tag_On_BufEnter = 1let Tlist_Inc_Winwidth = 0let Tlist_Max_Submenu_Items = 1let Tlist_Max_Tag_Length = 30let Tlist_Process_File_Always = 0let Tlist_Show_Menu = 0let Tlist_Show_One_File = 1let Tlist_Sort_Type = "order"let Tlist_Use_Horiz_Window = 0let Tlist_Use_Right_Window = 1let Tlist_WinWidth = 40let Tlist_Exit_OnlyWindow = 1let Tlist_Ctags_Cmd='D:\Vim\vim73\ctags.exe'map <C-f> :TlistToggle<CR>"bufexplorerlet g:bufExplorerDefaultHelp=1let g:bufExplorerDetailedHelp=0let g:bufExplorerSortBy='mru'nmap <C-X> :BufExplorer<CR>" php editing" remove CR at end of lineslet PHP_removeCRwhenUnix = 1" Set up automatic formattingset formatoptions+=tcqlro" Set maximum text width (for wrapping)set textwidth=110" NERD Commenterlet NERDShutUp = 1filetype plugin on"为指定后缀的文件指定字典文件autocmd FileType php set dictionary=D:\Vim\vimfiles\php.txtautocmd FileType python set dictionary=D:\Vim\vimfiles\python-complete-dictautocmd FileType python set dictionary=D:\Vim\vimfiles\html.txt"为指定后缀的文件指定模板文件"au FileType python set ft=python.django"au FileType html set ft=htmldjango.htmlset complete-=k complete+=kset runtimepath+=D:\Vim\vimfiles\vim-php-manualau BufNewFile,Bufread *.module,*.inc,*.php,*.install,*.test set keywordprg="help"au BufNewFile,BufRead *.install,*.inc,*.module,*.test set filetype=php: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 > <c-r>=ClosePair('>')<CR>:inoremap ' ''<ESC>i:inoremap " ""<ESC>ifunction! ClosePair(char)if getline('.')[col('.') - 1] == a:charreturn "\<Right>"elsereturn a:charendifendfunction"取消高亮set nohls"窗口最大化au GUIEnter * simalt ~xset guioptions-=mset guioptions-=Tset guioptions-=rset guioptions-=bset guioptions-=l"dir /s /b *.php > cscope.files"cscope -b"jj退出编辑状态 默认是按Esc 这个不方便imap jj <Esc>let g:SuperTabMappingForward="<tab>"
主要配置
1, 安装supertab插件 按tab自动补全 默认是 ctrl+n /ctrl+p
2, snipMate 快速模板编程
3,解决 supertab 和 snipMate tab键冲突 有snipMate模板匹配执行snipMate 否则 执行tab自动补全
就是 let g:SuperTabMappingForward="<tab>" 这个配置
4,php python 基于字典文件的自动完成
利用
这个插件下载后只用于生成python字典文件 不安装这个插件
需要我配置好的压缩包的同学 可以发邮件给我 quqiufeng@gmail.com