My current VIMRC configuration file

Source: Internet
Author: User

runtime!Debian.vim"Set EncodingSet encoding=utf-8Set Fencs=utf-8, Ucs-bom,Shift-Jis,gb18030,gbk,gb2312,cp936set fileencodings=utf-8, ucs-Bom,chinese"Language SettingsSet LANGMENU=ZH_CN. utf-8"command WQ wqcommand WQ wqcommand WWcommand Q Qmap<F5> I (<esc>ea) <Esc>Map<F8> oprintf ("Bug!here is a bug!!!! \ n");<esc>Map<F4> <Esc>:wq<cr>Map<F7> oprintf ("------------------------------------------------------------\ n");<esc>"Set Syntax highlightingsyntax Enable"Syntax on"set a color scheme"ColorScheme torte"You can use the mouse anywhere in the bufferSet mouse=Aset Selection=Exclusiveset SelectMode=Mouse,key"Highlight matching parenthesesSet Showmatch"Remove VI ConsistencySet Nocompatible"Set IndentSet tabstop=4Set Softtabstop=4Set Shiftwidth=4Set Autoindentset cindentif&term=="xterm"Set T_co=8Set T_SB=^[[4%DM Set T_SF=^[[3%Dmendif"Open the file type Auto-detect featurefiletype on"Set TagListLet tlist_show_one_file=0   "tags that display multiple filesLet tlist_file_fold_auto_close=1 "non-current file, function list collapse hiddenLet tlist_exit_onlywindow=1 "exit Vim When TagList is the last windowLet tlist_use_singleclick=1 "jump When clickedLet tlist_gainfocus_on_toggleopen=1 "get input focus when opening taglistLet tlist_process_file_always=1 "always parse the tag in the file regardless of whether the TagList window is open"MinibufexplorerLet g:minibufexplmapwindownavvim=1Let g:minibufexplmapwindownavarrows=1Let g:minibufexplmapctabswitchbufs=1Let g:minibufexplmodseltarget=1Let g:minibufexplmorethanone=0""setting up the Winmanager pluginLet g:winmanagerwindowlayout='fileexplorer| TagList'Nmap Wm:wmtoggle<cr>Map<silent> <F9>:wmtoggle<cr>"bind the F9 to Winmanager, which opens the Wimmanager"Set CscopeSet cscopequickfix=s-,c-,d-,i-,t-,e-"sets whether to display cscope results using the Quickfix window"setting up the grep pluginNnoremap <silent> <F3>:grep<cr>"Set auto-complete"filetype plugin indent on"Open File type detection set completeopt=longest,menu"Turn off the preview window when smart completion is complete"automatically load when a tags is present when you start VimifExists"Tags") Set Tags=./Tagsendif"set the method to update tags by F12Map <F12>: Call Do_cstag () <CR>Nmap<[email Protected]>s:csFindS <c-r>=expand ("<cword>") <CR><CR>:copen<CR>Nmap<[email Protected]>g:csFindG <c-r>=expand ("<cword>") <CR><CR>Nmap<[email Protected]>c:csFindC <c-r>=expand ("<cword>") <CR><CR>:copen<CR>Nmap<[email Protected]>t:csFindT <c-r>=expand ("<cword>") <CR><CR>:copen<CR>Nmap<[email Protected]>e:csFindE <c-r>=expand ("<cword>") <CR><CR>:copen<CR>Nmap<[email Protected]>f:csFindF <c-r>=expand ("<cfile>") <CR><CR>:copen<CR>Nmap<[email Protected]>i:csFindI ^<c-r>=expand ("<cfile>") <CR>$<CR>:copen<CR>Nmap<[email Protected]>d:csFindD <c-r>=expand ("<cword>") <CR><CR>:copen<CR>functionDo_cstag () Letdir=GETCWD ()ifFilereadable ("Tags")            if(g:iswindows==1) Let tagsdeleted=delete (dir."\\"."Tags")            ElseLet tagsdeleted=delete ("./"."Tags") endifif(tagsdeleted!=0) Echohl warningmsg|Echo "Fail to do tags! I cannot delete the tags"|Echohl None return endif endififHas ("Cscope") Silent! Execute"CS Kill-1"endififFilereadable ("Cscope.files")            if(g:iswindows==1) Let csfilesdeleted=delete (dir."\\"."Cscope.files")            ElseLet csfilesdeleted=delete ("./"."Cscope.files") endifif(csfilesdeleted!=0) Echohl warningmsg|Echo "Fail to do cscope! I cannot delete the cscope.files"|Echohl None return endif endif 
    ifFilereadable ("Cscope.out")            if(g:iswindows==1) Let csoutdeleted=delete (dir."\\"."Cscope.out")            ElseLet csoutdeleted=delete ("./"."Cscope.out") endifif(csoutdeleted!=0) Echohl warningmsg|Echo "Fail to do cscope! I cannot delete the cscope.out"|Echohl None return endif endif 
    if(Executable ('Ctags'))            "silent! Execute"!ctags-r--c-types=+p--fields=+s *"silent! Execute"!ctags-r--c++-kinds=+p--fields=+ias--extra=+q."endifif(Executable ('Cscope') && has ("Cscope") )            if(g:iswindows!=1) Silent! Execute"!find.-name ' *.h '-o-name ' *.c ' -o-name ' *.cpp '-o-name ' *.java '-o-name ' *.cs ' > Cscope.files"            ElseSilent! Execute"!dir/s/b *.c,*.cpp,*.h,*.java,*.cs >> cscope.files"endif Silent! Execute"!cscope-b"Execute"Normal:"                                                                                ifFilereadable ("Cscope.out") Execute"CS Add cscope.out"endif endifendfunction"Set the default shellSet shell=Bash"set the history of Vim RecordsSet history= -"set the file to be read automatically when the file is changed externallyifExists"&autoread") Set Autoreadendif"Set AmbiwidthSet ambiwidth=Double"Set File typeSet ffs=Unix,dos,mac"Set Incremental Search modeSet Incsearch"Set Mute modeset Noerrorbellsset novisualbellset t_vb="do not back up filesset Nobackupset nowbset nu"Keep the status bar consistently above the command linefunction!CurDir () let CurDir= Substitute (GETCWD (), $HOME,"~","g") return Curdirendfunctionset laststatus=2Set Statusline=[%n]\%f%m%r%h\ \|\ \pwd: \%{curdir ()}\ \ \|\ go!go!go!baochunzhiexecute pathogen#infect () syntax Onfiletype plugin indent on"Open File Type detection"grep pluginNnoremap <silent> <F3>:grep<cr>

My current VIMRC configuration file

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.