"*************************************** "******************************** * *********** "Set the operating system if has (" Win32 ") | has ("win64") | has ("win32unix") Let G: iswin = 1 else let G: iswin = 0 endif
"*************************************** * ***** "End global condition "******************************* ************
"*************************************** "********************************* **********
"File encoding" set encoding = utf-8set fileencodings = ucs-bom, UTF-8, gbkset fileencoding = UTF-8 "file type recognition, add related plug-ins and indentation scripts "filetype on" filetype plugin onfiletype plugin indent on "set fileformat = unixset fileformats = Unix" set shellif G: iswin = 0 set shell = bashendif "session settings set sessionoptions + = slash, unix "turn off compatibility mode set nocompatible" automatically reads set autoread when external modifications are made "set mouse = A" set historical set history = 400 "syntax highlight syntax enable" display result highlight set hlsearch "The Rows exceeding the length of the current row go back to set wrap
"Set nu" smart indent for row number settings. Ts tabstop converts the tab key to a space for display. It is mainly used for screen display and printing. "If all tabs are used on the page, where tabstop = 4 and tabstop = 8 are displayed, the page width is different. "STS softtabstop converts the tab to the number of spaces during editing, use "et expandtab" with expandtab to insert a tab in insert mode with a proper number of spaces instead of "SW shiftwidth auto indent the number of spaces used in each step set AI Ts = 4 STS = 4 et Sw = 4 "set color scheme colorscheme desert
"Automatically save the file autowriteset aw
"Set ignorecase" set IC
"Enhanced command line completion set wildmenu
"Load System-specific scripts" Source $ vimruntime/vimrc_example.vimif G: iswin = 1 source $ vimruntime/mswin. Vim behave mswinendif
Set ambiwidth = doubleset smarttabset backspace = 2 set textwidth = 0
Set mouse =
"Set do not back up set nobackup" set open file encoding "set encoding when the file is opened guess list set fencs = UTF-8, gb18030, UTF-16, big5 "sets the help language if version> = 603 set helplang = cnendif when the version is later than 603
"*************************************** * *** "End regular "******************************** ***********
"*******************************" Sets tlist "**** ***************************
Let tlist_show_one_file = 1 "if the taglist window is the last window, exit vimlet layout = 1let tlist_show_menu = 1let tlist_winheight = 25let tlist_use_right_window = 1" tasklist "map t: tasklist <CR> NMAP <silent> <F4>: tlisttoggle <CR>
"*******************************" End sets tlist "*** ****************************
"******************************" Set winmanager "**** ***************************
"Winmanager" Let G: winmanagerwindowlayout = 'nerdtree | taglist' "Let G: winmanagerwindowlayout = 'nerdtree'" "sets the winmanager width. The default value is 25" Let G: winmanagerwidth = 30 "NMAP <F8>: wmtoggle <CR>" Let G: autoopenwinmanager = 1
"******************************" End settings winmanager "*** ****************************
"******************************" Set minibufexplorer "**** * *************************** Let G: minibufexplmapwindownavvim = 1 Let G: minibufexplmapwindownavarrows = 1 Let G: minibufexplmapctabswitchbufs = 1 Let G: minibufexplmodseltarget = 1map! <Silent> <c-tab>: BN <CR> "minibuf always show" Let G: minibufpolicermorethanone = 0
"******************************" End setting minibufexplorer "*** ****************************
"***************************" Bufexplorer "******* **********************
"Let G: bufexplorerdefaulthelp = 0" do not show default help. "Let G: bufexplorershowrelativepath = 1" show relative paths. "Let G: bufpolicersortby = 'mru'" sort by most recently used. "Let G: bufexplorersplitright = 0" Split left. "Let G: bufpolicersplitvertical = 1" split vertically. "Let G: bufexplorersplitvertsize = 30" split width "Let G: bufexplorerusecuritywindow = 1" open in new window. "autocmd bufwinenter \ [Buf \ list \] SETl nonumber "*************************** ** "End bufexplorer "*****************************
"***************************" Set grep "****** * ********************* let grep_path = 'd: /gnuwin32/bin/grep.exe 'let fgrep_path = 'd:/gnuwin32/bin/fgrep.exe 'Let egrep_path = 'd: /gnuwin32/bin/egrep.exe 'nnoremap <silent> <F3>: grep <CR>
"***************************" End grep "****** ***********************
"******************" Nerdtree set "**************** ***
"Set nerdtree curent dirif G: iswin = 1 cd d: \ else CD/home/zhaoyongendif
Let G: nerdtree_title = "[nerd tree]" Let nerdtreeshowbookmarks = 1 "always show the bookmarks let nerdtreechdirmode = 2" when you open the bookmarks, the vim PWD is automatically set to the opened directory, if your project has a tags file, you will find this command very helpful.
Function! Nerdtree_start () EXE 'nerdtree' endfunction
Function! Nerdtree_isvalid () return 1 endfunction
NMAP <silent> <F2>: nerdtreetoggle <CR>
"******************" End nerdtree set "*************** ****
"NMAP <F4>: nerdtree <CR>
""************** *****
"Set PHP documentset runtimepath + = D: \ Program \ files \ Vim \ php_docif G: iswin = 1 Map <C-J> :! Php-l % <CR> else Map <C-J> :! Php-l % <CR> endif
"******************" End PHP language set end "************* ******
"******************" Python language set "*************** * *** "" set Python documentlet G: pyref_python = 'd: \ Program Files \ Vim \ Python-HTML '"tagsset tags = D: \ code \ Python \ tags" Exec pythonmap <F6> :! Python %
"Pydictionlet G: pydiction_location = 'd: \ Program Files \ Vim \ vim73 \ ftplugin \ pydiction \ complete-dict '"colorscheme my-Molokai ""***************** ** "End Python language set "*******************
"Syntax highlight functionfunction! Togglesyntax () If exists ("G: syntax_on") syntax off else syntax enable endifendfunction
"Quick edit vimrc file shortcut Map <silent> EE: e d: \ Program Files \ Vim \ _ vimrc <CR>" When vimrc has been saved, reload vimrcautocmd! Bufwritepost * _ vimrc source D: \ Program \ files \ Vim \ _ vimrcautocmd! Vimenter * exec 'source'. "D:/program \ files/Vim/session. Vim"
Autocmd! Vimleave * <leader> mbtautocmd! Vimleave *: tlistclose <CR> autocmd! Vimleave *: nerdtreeclose <CR> autocmd! Vimleave * exec 'mksession! '. "D:/program \ files/Vim/session. Vim"
"Use Ctrl + W to close current cache" Map <silent> <C-W> <c-k> d <CR> <c-j> "new tag Map <silent> <C-N >: enew <CR>
"Maximum window au guienter * simalt ~ X
"Disable the current bufmap <silent> QQ: BD <CR>
"Clear search highlighted Map <silent> unregistered/axkexiej <CR>
"Annotation ing key let mapleader =", "Map <silent> <leader> L: Call nerdcomment (0," toggle ") <CR> Map <silent> <leader> K: Call nerdcomment (0, "sexy") <CR>
"Automatically complete brackets" map auto complete "inoremap () <ESC>: Let leavechar =") "<CR> iinoremap [[] <ESC>: let leavechar = "]" <CR> iinoremap {<ESC> O} <ESC>: Let leavechar = "}" <CR> O "inoremap {}< ESC>: let leavechar = "}" <CR> I "inoremap ''' <ESC>: Let leavechar =" '"<CR> I" inoremap "" <ESC>: let leavechar = '"' <CR> I" au bufnewfile, bufread *. \ (Vim \)\@! Inoremap "<ESC>: Let leavechar = '"' <CR> I "au bufnewfile, bufread *. \ (txt \)\@! Inoremap ''' <ESC>: Let leavechar = "'" <CR> I "imap <m-L> <ESC>: EXEC" normal F ". leavechar <CR> A "imap <D-L> <ESC>: EXEC" normal F ". leavechar <CR>
"Set statusline = % F % m % R % H % w \ [format =%{ & ff}] \ [type = % Y] \ [ASCII =\% 03.3b] \ [hex = \ % 02.2b] \ [Pos = % 04l, % 04 V] \ [% P %] \ [Len = % L] Set laststatus = 2
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.