Vim Configuration when PHP was previously written

Source: Internet
Author: User
First step: Download Vim plugin management tool Vundle

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

Step two: Copy my VIMRC to your ~/.VIMRC (remember to back up before you change it)

"See:http://vimdoc.sourceforge.net/htmldoc/options.html for details" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " "," "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Gvim Run in enhanced mode, do not use the VI keyboard mode set nocompatible "Settings support multi-language, solve garbled" set the internal code to Utf-8set Encoding=utf-8set Termencoding=utf-8set Fileencodings=utf-8,gbk,default,latin1 "resolve Consle output garbled language messages Zh_cn.utf-8" Help menu language Set HELPLANG=CN "sets how Many lines of history VIM have to Rememberset history=700 "Enable filetype pluginsfiletype off" Requiredfiletype plugin Onfiletype indent on "Set to auto read when a file was changed from the Outsideset Autoread" with a map leader it ' s POSSIBL E to does extra key combinations "like
 
  W Saves the current filelet Mapleader = "," Let G:mapleader = "," "Fast Savingnmap
  
   w:w!
   
    "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "Turn on the Wild menuset wildmenu" Ignore compiled Filesset Wildignore=*.o,*~,*.pycif have ("Win16") | | Has ("Win32") set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.  Ds_storeelse set Wildignore+=.git\*,.hg\*,.svn\*endif "Height of the command barset cmdheight=2" Configure backspace so It acts as it should Actset Backspace=eol,start,indentset whichwrap+=<,>,h,l "Ignore case when Searchingset Ignorec  ASE "When searching try to being smart about cases set Smartcase" Highlight search resultsset hlsearch "makes search act like Search in modern Browsersset incsearch "following line clears the search highlights when pressing LBNNOREMAP
    
     
/: Nohlsearch 
     
      
"Don ' t redraw while executing macros (Good performance config) set Lazyredraw" for regular expressions turn magic onset MA GIC "Show matching brackets when text indicator was over Themset showmatch" How many tenths of a second to blink when match ing bracketsset mat=2 "No annoying sound on errorsset noerrorbellsset novisualbellset t_vb=set tm=500" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Enable syntax highlightingsyntax enabletry colorscheme desertcatchendtryset background=dark "Set extr A options when running in GUI Modeif have ("gui_running") set guioptions-=t set guioptions+=e set t_co=256 set g uitablabel=%m\%tendif "Use Unix as the standard file typeset ffs=unix,dos,mac" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "," "" "" "" "" "" "" "" "" "" "" "" "" "Backups and Undo" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " "" Turn backup off, since most stuff are inSVN, git et.c anyway...set nobackupset nowbset noswapfile "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " "" "" "=" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " Instead of Tabsset Expandtab "be smart when using tabs;) set Smarttabset tabstop=4set shiftwidth=4" Custom settings for different types of files au Fil EType html,im,javascript,css Set Shiftwidth=2au FileType html,im,javascript,css set Tabstop=2au FileType Java,python, PHP set Shiftwidth=4au FileType java,python,php set tabstop=4 "sets the maximum number of characters per line, more than that, wrap set textwidth=80" Linebreak on Chara Ctersset lbrset tw=500set ai "Auto indentset si" Smart indentset wrap "wrap Lines" "" "" "" "" "" "" "" "" "" "" "" "" "" "" =& Gt Visual mode related "" "" "" "" "" "" "" "" "" "" "" "" "" "" "visual mode pressing * or # searches for the current selection" Super u seful!  From a idea by Michael Naumann "Vnoremap
      
       *: Call Visualselection (' F ')
       
        "Vnoremap
        
         #: Call Visualselection (' B ')
         
          "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "tabs, windows and Buffers" "" "" " "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "Treat long lines as break lines Hem) Map J Gjmap K GK "Moving between Windowsnnoremap
          
           H
           
            Hnnoremap
            
             L
             
              Lnnoremap
              
               J
               
                Jnnoremap
                
                 K
                 
                  K "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Always show the Status lineset laststatus=2 "Format the status Lineset statusline=\%{haspaste ()}%f%m%r%h\%w\ \ cwd:\%r%{getcwd ()}%h\ \ \ \ \ \ \line:\ %-14. (%l,%c%v%) \%P "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "Remap VIM 0 to first non-blank charactermap 0 ^" type S T you ' re looking for, A/, and how to replace it withnmap S:%s/
                  
                   
                    \>//g
                    
                     
                      Vmap s:s/
                      
                       
                        \>//g
                        
                         
                          "Basic Editor settings set number" Display line number set laststatus=2 "Show status bar (default = 1, cannot display status bar) set cmdheight=1" SET command line 1 "Set showtabline=2" Show tab label "s ET tabline+=%f "tab tag" Enable Code foldingset foldenableset foldmethod=syntaxset mouse=a "use mouse in any case" working directory changes with file Autocmd Bufenter * CD%:p: H "does not display the toolbar set guioptions-=t" profile. VIMRC automatically reload after changing to make the settings take effect autocmd! Bufwritepost. VIMRC source ~/.VIMRC "set reload. VIMRC Shortcut Map
                           
                           
                            Ss:source ~/.VIMRC
                            
                             "Set up Quick Edit. VIMRC Shortcut key Map
                              
                              
                               Ee:e ~/.VIMRC
                               
                                "------replacing------" type S, then type what do you ' re looking for, A/, and what to replace it withnmap S:%s/
                                
                                 
                                  \>//g
                                  
                                   
                                    Vmap s:s/
                                    
                                     
                                      \>//g
                                      
                                       
                                        "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " www.vim.org/scripts/script.php?script_id=743 "CD ~/.vim" Tar zxvf svn-
                                        
                                         . tgz "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "
                                         
                                          :!svn Up
                                          
                                           "Submit svn (current directory)" map
                                           
                                            :!svn ci-m ""
                                            
                                             "Submit svn (current file)" Map
                                             
                                              :!svn ci-m ""%
                                              
                                               "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" scripts/script.php?script_id=3465 "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Noremap
                                                
                                                
                                                 Y:tagbartoggle
                                                 
                                                  Let g:tagbar_ctags_bin= '/usr/bin/ctags-exuberant '-g:tagbar_width=26 ' "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "=>exuberant Ctags" sudo apt-get install exuberant-ctags "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
                                                  
                                                   Ct:! /usr/bin/ctags-exuberant-r *
                                                   
                                                    , "," "," "," "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" Vundle " Github.com/gmarik/vundle.git ~/.vim/bundle/vundle "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "Set Rtp+=~/.vim/bundle/vundle/call VUNDLE#RC ()" Let Vundle manage Vundle "required! Bundle ' Gmarik/vundle ' "My Bundles here:" "Original repos on GitHub" Indentbundle ' yggdroot/indentline ' "Pluginbundle ' The-nerd-tree ' "------nerdtree options------" Automatically open when Vim is turned on without a file nerdtreeautocmd Vimenter * if!ARGC () | Nerdtree | endif let nerdtreeignore=[' CVS '] let nerdtreechdirmode=2 "setting root dir in NT also sets VIM ' s CD noremap
                                                     
                                                     
                                                      N:nerdtreetoggle
                                                      
                                                       "These prevent accidentally loading files while in the Nerdtree panel autocmd FileType Nerdtree noremap
                                                        
                                                         
                                                         
                                                          Autocmd FileType Nerdtree Noremap
                                                           
                                                            
                                                            
                                                             Autocmd FileType Nerdtree Noremap
                                                              
                                                               
                                                               
                                                                Autocmd FileType Nerdtree Noremap
                                                                 
                                                                  
                                                                  
                                                                   Bundle ' jiangmiao/auto-pairs ' bundle ' pangloss/vim-javascript ' bundle ' mattn/emmet-vim ' Plugin ' mattn/ Jscomplete-vim ' Bundle ' Shougo/neocomplcache ' "Disable autocomplpop. Let G:acp_enableatstartup = 0 "use Neocomplete. Let G:neocomplete#enable_at_startup = 1 "Use Smartcase. Let G:neocomplete#enable_smart_case = 1 "Set minimum syntax keyword length. Let G:neocomplete#sources#syntax#min_keyword_length = 3 let G:neocomplete#lock_buffer_name_pattern = ' \*ku\* ' "Define Dictionary. Let g:neocomplete#sources#dictionary#dictionaries = {\ ' default ': ', \ ' Vimshell ': $HOME. ' /.vimshell_hist ', \ ' scheme ': $HOME. ' /.gosh_completions ' \} ' Define keyword. If!exists (' g:neocomplete#keyword_patterns ') let G:neocomplete#keyword_patterns = {} endif let G:neocomplete#keyword_ patterns[' Default ' = ' \h\w* ' "Bundle ' Joonty/vdebug '"
                                                                   
                                                                    : Start/run (to next breakpoint/end of script) "
                                                                    
                                                                     : Step Over "
                                                                     
                                                                      : Step Into "
                                                                      
                                                                       : Step Out "
                                                                       
                                                                        : Stop debugging "to stop debugging, press
                                                                        
                                                                         . Press it again to close the debugger interface. "
                                                                         
                                                                          : Detach script from Debugger "
                                                                          
                                                                           : Run To Cursor "
                                                                           
                                                                            : Set Line Breakpoint "
                                                                            
                                                                             : Show context variables (e.g. after "eval") "
                                                                             
                                                                              : Evaluate variable under cursor ": Breakpoint
                                                                              
                                                                               : Set a breakpoint of any type (See:help vdebugbreakpoints) ": Vdebugeval
                                                                               : Evaluate some code and display the result "
                                                                                
                                                                                  E:evaluate the expression under visual highlight and display the result "Syntaxbundle ' scrooloose/syntastic ' let G:syntas Tic_check_on_open = 1 Let G:syntastic_error_symbol = '? ' Let G:syntastic_warning_symbol = '? ' Let G:syntastic_auto_loc_lis T = 1 Lets g:syntastic_loc_list_height = 5 let g:syntastic_enable_highlighting = 0 "If you want to check JavaScript, you can install the Jshint plugin" sudo Apt-get install Nodejs "sudo npm install jshint" # if it is 12.10, I find that the naming of the Nodejs executable does not conform to the routine, to make a link to "sudo ln-s/usr/bin/nodejs/ Usr/bind/node "": Brief Help ": Bundlelist-list configured Bundles": Bundleinstall (!)-Install (update) bundles ": Bundlese Arch (!) Foo-search (or refresh cache first) for Foo ": Bundleclean (!)-Confirm (or auto-approve) removal of unused bundles "Vundle is mainly the above four commands, such as Bundleinstall is all reinstalled, bundleinstall! is the update" General installation process for plug-in, first bundlesearch a plug-in, and then select in the list, press I install "after installation , in VIMRC, add bundle ' xxx ' so that bundle can load this plug-in, and if "need to configure this plug-in, is also set in VIMRC" if the search to the installation can not be replaced first in VIMRC add bundle ' xxx ' " In the go to Vim to execute bundleinstall to install "Uninstall words" 1. Comment out BundLe/pluginxxx (plugin-related statement to delete) "2. : Bundleclean "done!" see:h vundle for more details or wiki to FAQ "ps:comments after Bundle command is not allowed ..." "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "," "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" function! Haspaste () If &paste return ' paste MODE ' en return ' endfunction
                                                                                
                                                                              
                                                                             
                                                                            
                                                                           
                                                                          
                                                                         
                                                                        
                                                                       
                                                                      
                                                                     
                                                                    
                                                                   
                                                                  
                                                                 
                                                                
                                                               
                                                              
                                                             
                                                            
                                                           
                                                          
                                                         
                                                        
                                                       
                                                      
                                                     
                                                    
                                                   
                                                  
                                                 
                                                
                                               
                                              
                                             
                                            
                                           
                                          
                                         
                                        
                                       
                                      
                                     
                                    
                                   
                                  
                                 
                                
                               
                              
                             
                            
                           
                          
                         
                        
                       
                      
                     
                    
                   
                  
                 
                
               
              
             
            
           
          
         
        
       
      
     
    
   
  
 
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.