My VIM--VIMRC configuration

Source: Internet
Author: User
Tags eol

The main reference is the integration of the online comparison of the heat of a few vim configuration documents, coupled with my habits and formed. Thanks for their dedication!

Basically there are comments on each line of the configuration, and I believe you will see it carefully.

650) this.width=650; "src="/img/fz.gif "alt=" Copy Code "style=" Margin:0px;padding:0px;border:none; "/>

"Do not use the VI keyboard mode, but Vim own set nocompatible"   syntax highlighting Set syntax=on "  Remove the input error prompt sound Set noeb"   When working with unsaved or read-only files, pop the confirmation set confirm "  Auto indent set autoindentset cindent"  tab key width set  Tabstop=4 "  Unified indent to 4set softtabstop=4set shiftwidth=4"   do not use spaces instead of tabs Set noexpandtab "  Use tab Set smarttab at the beginning of lines and segments   show line numbers set number   history set history=1000 prevent temporary files from being generated set  Nobackupset noswapfile "Search ignores case set ignorecase" search verbatim Fugauliang set hlsearchset incsearch "inline replace set  gdefault "Encoding settings set enc=utf-8set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936" language setting set  langmenu=zh_cn. UTF-8SET&NBSP;HELPLANG=CN "  My status line displays the contents (including file type and decoding) set statusline=%f%m%r%h%w\ [format=%{&ff}]\  [type=%y]\ [pos=%l,%v][%p%%]\ %{strftime (\ "%d/%m/%y\ -\ %h:%m\")} "set  statusline=[%f]%y%r%m%*%=[line:%l/%l,column:%c][%p%%] "  Always show status line set laststatus=2"   during the editing process, In the lower right corner, the status line of the cursor position is displayed Set ruler           "  command line (under status line) height, default is 1, here is 2set  cmdheight=2 "  Detection file type Filetype on"   load file type plug-in Filetype plugin on "  Load related indentation files for a specific file type Filetype indent on "  Save global variable set viminfo+=!"   Words with the following symbols do not wrap set iskeyword+=_,$,@,%,#,-"  Putting number of pixel rows inserted set linespace=0"   Command-line autocomplete in enhanced mode Set wildmenu "  enable BACKSPACE to handle indent, eol, start such as normal set backspace= Indent,eol,start "status bar displays the currently executed instruction Set showcmd"   allows backspace and cursor keys to cross the line boundary set whichwrap+=<,>,h,l "   You can use the mouse anywhere in the buffer (similar to the workspace in office, double-click the mouse to navigate) set mouse=aset selection=exclusiveset selectmode= Mouse,key "  by using:  commands command, tell us which line of the file has been changed set report=0"   Start without showing the help Somalia children's tips set  Shortmess=atl "  Displays white space between divided windows for easy reading SET&NBSP;FILLCHARS=VERT:\&NBSP;,STL:\&NBSP;,STLNC:"   Highlight matching parentheses set  showmatch "  matches the time of the brace highlighting (in very one second) set matchtime=5"   Keep 3 lines away when the cursor moves to the top and bottom of buffer set Scrolloff=3 "  Provide auto indent for C programs set smartindent" Hide Toolbar set guioptions-=t "Hide Menu bar set guioptions-=m" Turn on Collapse " Set foldenable "Set syntax collapse" Set foldmethod=syntax "set the width of the collapsed area" set foldcolumn = 0 "set the number of collapsed layers" set  foldlevel=1   "Set auto-close collapse" Set foldclose=all "automatically toggles the current directory to the current file directory set autochdirset tags= Tags;let tlist_show_one_file=1let tlist_exit_onlywindow=1 "Set Font set guifont=inconsolata\ 12" Set the color scheme colorscheme desertlet g:winmanagerwindowlayout= ' fileexplorer| TagList ' nmap wm :wmtoggle<cr>set cscopequickfix=s-,c-,d-,i-,t-,e-cs add  cscope.outlet g:minibufexplmapctabswitchbufs = 1let g:minibufexplmapwindownavvim =  1 "  Displays line numbers only when the following file types are detected, and normal text files do not display If has (" Autocmd ")    autocmd FileType  xml,html,c,cs,java,perl,shell,bash,cpp,python,vim,php,ruby set number   autocmd  filetype xml,html vmap <c-o> <ESC> ' <i<!--<ESC>o<ESC> ' >o-->   autocmd filetype java,c ,cpp,cs vmap <c-o> <esc> ' <o/*<ESC> ' >o*/   autocmd  filetype html,text,php,vim,c,java,xml,bash,shell,perl,python setlocal textwidth=100    autocmd Filetype html,xml,xsl source  $VIMRUNTIME/plugin/closetag.vim    autocmd bufreadpost *      \ if line ("' \" ")  >  0 && line ("' \" ")  <= line (" $ ")  |      \    exe  "Normal g" " |      \ endifendif   " has (" Autocmd ")"  f5 compile and Run C program " c Compile and run MAP&NBSP;&LT;F5&GT;&NBSP;:CALL&NBSP;COMPILERUNGCC () &LT;CR&GT;FUNC!&NBSP;COMPILERUNGCC () exec  "W" exec  "!gcc -wall % -o %<" exec   "! ./%<" endfUNC " c++ Compile and run MAP&NBSP;&LT;F6&GT;&NBSP;:CALL&NBSP;COMPILERUNGPP () <cr>func! compilerungpp () exec   "W" exec  "!CSCOPE&NBSP;-RBQ" Endfunc "  can be displayed beautifully. NFO file Set encoding=utf-8function! setfileencodings (encodings)     let b: Myfileencodingsbak=&fileencodings    let &fileencodings=a: Encodingsendfunctionfunction! restorefileencodings ()     let &fileencodings=b : myfileencodingsbak    unlet b:myfileencodingsbakendfunctionau bufreadpre * . Nfo call setfileencodings (' cp437 ') |set ambiwidth=singleau bufreadpost *.nfo  Call restorefileencodings ()

650) this.width=650; "src="/img/fz.gif "alt=" Copy Code "style=" Margin:0px;padding:0px;border:none; "/>


My VIM--VIMRC configuration

Related Article

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.