Vimrc of a master

Source: Internet
Author: User

Appendix: Vim learning process ......

Http://www.cppblog.com/xguru/archive/2010/12/22/vim_brain.html

Windows users can put it in C:/users/Administrator/_ vimrc

Other users and so on.

Set nocompatiblesource $ vimruntime/vimrc_example.vimsource $ vimruntime/mswin. vimbehave mswin set diffexpr = mydiff () function mydiff () Let opt = '-A -- binary' If & diffopt = ~ 'Icase' | let opt = opt. '-I' | endif if & diffopt = ~ 'Iwhite' | let opt = opt. '-B' | endif let arg1 = V: fname_in if arg1 = ~ ''| Let arg1 = '"'. arg1. '"' | endif let arg2 = V: fname_new if arg2 = ~ ''| Let arg2 = '"'. arg2. '"' | endif let arg3 = V: fname_out if arg3 = ~ ''| Let arg3 = '"'. arg3. '"' | endif let eq ='' if $ vimruntime = ~ ''If & SH = ~ '\'. Arg3. eqendfunction "color colorscheme desert" font set guifont = bitstream_vera_sans_mono: H12: cansi "row number, row number column width set nuset numberwidth = 2 "tab length set tabstop = 2" automatic alignment set autoindent "syntax highlight syntax on" Encoding Problems When GBK characters are set. Set fileencodings = UTF-8, ucs-bom, gb18030, GBK, gb2312, cp936 "line spacing set linespace = 2" <> adjust the length of the indent set shiftwidth = 2 "initialize the window width and height set columns = 150 set lines = 30" initialize the window position winpos 52 42" disable Automatic line feed Set nowrap "to list matching items when entering commands Dmenu "show cursor position set rtries" Split Window keep equal width and height set wide always "matching bracket rules, added HTML <>" set matchpairs = (:),{:}, [:], <:> "Let the unspace, up and down arrows automatically move the first row to the next row (including insert mode)" set whichwrap = B, S, <,>, [,] "cancel Automatic Backup set nobackup" Keep a backup before closing the file "set writebackup" JS syntax highlighted script Let G: export cript_enable_domhtmlcss = 1 "cursor quasi-star set cursorlinehi cursorline guibg = none GUI = underline" "set cursorcolumn" Hi cursorcolum GUI = underline "auto modify set autoread" unspecified font width, according to double S Et ambiwidth = Double "Open JavaScript collapse" setlocal foldlevel = 1let G: tlist_javascript_settings = 'javascript; s: string; A: array; O: object; F: function; m: member 'let B: javascript_fold = 1 "enable folding" auto-filled brackets, etc.: inoremap (): inoremap) = closepair ('): inoremap {} O: inoremap} = closepair ('}'): inoremap [[] I: inoremap] = closepair (']'): inoremap "": inoremap ''' function closepair (char) if Getline ('. ') [col ('. ')-1] = A: CH Ar return "/" else return a: Char endifendfunction "auto-completion html" function! Inserthtmltag () let PAT = '\ c <\ W \ + \ s * \ (\ s \ + \ W \ + \ s * = \ s * [''# $ ;, (). a-z0-9] \ + \) * \ s *> 'normal! A> let save_cursor = getpos ('. ') Let result = matchstr (Getline (save_cursor [1]), Pat) "If (search (Pat,' B ', save_cursor [1]) & searchpair ('<', '', '>', 'bn ', 0, Getline ('. ')> 0) if (search (Pat,' B ', save_cursor [1]) normal! Lyiwf> normal! A <! -- Normal! P normal! A --> endif: Call cursor (save_cursor [1], save_cursor [2], save_cursor [3]) endfunctioninoremap>: Call inserthtmltag () A "Translucent Settings" "au guienter * Call libcallnr (" vimtweak. DLL "," setalpha ", 234)" Git configuration "" I set laststatus = 2 "" I set statusline =%{ gitbranch ()} command gogm CD E: \ apache \ htdocs \ GM \

Self-http://www.designsor.com/archives/1124

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.