My vim configuration (ycm not in effect) notes later study

Source: Internet
Author: User

"An example forA VIMRCfile. "Author Holen" Data .-6"Use Vim settings, rather than Vi settings (much better!)." This must is first, because it changes other options asa side effect.Setnocompatible "Allow backspacing over everythinginchInsert ModeSetBackspace=Indent,eol,startSethistory= -"Keep -Lines ofCommand Line HistorySetruler "show the cursor position all the timeSetshowcmd "Display incomplete commandsSetIncsearch " Doincremental searching "in many terminal emulators the mouse works just fine, thus enable it.SetMouse=a "switch syntax highlighting on, when the terminal have colors" Also Switch on highlighting the last used search Patte RN.if&t_co >2||Have ("gui_running") syntax onSetHlsearchSetincsearchendif "Detection filetypefiletype off" loading filetype plugin "filetype plugin on" load indent files, toAutomatically Dolanguage-dependent indenting. "FileType indent on" Python utomatic insufficiency ": Inoremap (()<ESC>i ": inoremap)<c-r>=closepair (')') <CR>": Inoremap{ {}<ESC>i ": Inoremap}<c-r>=closepair ('}') <CR>": Inoremap [[]<ESC>i "": Inoremap]<c-r>=closepair (']') <CR>" ": Inoremap " " "<ESC>i "": Inoremap'"' <esc>ifunction! Closepair (char)ifGetline (".") [Col ('.')-1] ==A:char return "\<Right>"    Elsereturn A:char endifendfunction "Auto AddfileHeaderautocmd Bufnewfile*.py 0r ~/.vim/.vim_head_template/Vim_pythonautocmd Bufnewfile*.py ks|call FileName () |'sAutocmd bufnewfile *.py ks|call createdtime () |'sAutocmd Bufnewfile *normal Gfun FileName ()ifLine ("$") >TenLet l=Ten    ElseLet l=Line ("$") endif EXE "1, ". L." G/file Name:.*/s/file name:.*/File Name: ". Expand ("% ") Endfun fun createdtime ()ifLine ("$") >TenLet l=Ten    ElseLet l=Line ("$") endif EXE "1, ". L." g/created time:.*/s/created time:.*/created Time: ". Strftime ("%y-%m-%d%T ") Endfun" Other general settingsSetNucolor Elflordwinpos225 225Setlines= *columns= theColo PeachpuffSetautoindent "SetGuifont=Lucida_console:h12Settabstop=4SetShiftwidth=4SetautoindentSetShowmatchSetAutowriteSetMagicSetConfirmSethistory= -SetNoswapfileSetWhichwrap+=<,>, H,lSetclipboard+=unnamedSetnoautoindentSetnosmartindentSetnocindent "Allow folderSetfoldenableSetFoldmethod=Manual "SetencodeSetencoding=utf-8Setfileencoding=utf-8Setfileencodings=ucs-bom,utf-8, gb18030,cp936,big5,euc-jp,euc-kr,latin1 "" Moved window Mappingnmap<C-H> <c-w>h "Control+h toLeft Nmap<C-J> <c-w>j "Control+j toDown nmap<C-K> <c-w>k "Control+k toUp Nmap<C-L> <c-w>l "Control+l toRight "Keyboard mapping" None "Vundle Plug-inchsettings "filetype off" required "SetThe runtime path toInclude Vundle andInitializeSetrtp+=~/.vim/bundle/vundle/Call VUNDLE#RC () ' Let Vundle manage vundle, required ' original repos on GitHub (on GitHub repository site non-vim-scripts Plugins) "Bundle'tpope/vim-fugitive'"Vim-scripts Repos (vim-scripts Plugins) "Bundle'Fuzzyfinder'"Other" Bundle'Git://git.wincent.com/command-t.git'"Folder Viewsbundle'Scrooloose/nerdtree.git'the HTML andCssbundle'Mattn/emmet-vim.git'"Code Completionbundle'Valloric/youcompleteme'"Right Tagbarbundle'Majutsushi/tagbar'"Youcomplete use Jedi toCompletion Pythonbundle'Davidhalter/jedi-vim'"Like Sourceinsight" Bundle'WESLEYCHE/SRCEXPL'filetype plugin indent onlet nerdtreewinpos=' Left'"Mapping OpenorClose Nerdtereemap<silent> <F2>:nerdtreetoggle<cr>"Mapping Tagbartogglemap<silent> <F3>:tagbartoggle<cr>"Let Tagbartogglewinwidth=1"Mapping Srcexpltoggle" map<silent> <F4>:srcexpltoggle<cr>"Brief Help": Bundlelist-list configured plugins ":P Lugininstall (!)": Bundlesearch (!) Foo-Search (orRefresh Cache first) forfoo ": Bundleinstall (update) plugins": Bundleclean (!)-Confirm (orAuto-approve) Removal ofunused "hide. Pyclet nerdtreeignore=['\.pyc$','\~$'] "Ignore filesinchnerdtree "Ycmlet mapleader="," Let G:mapleader="," Autocmd FileType pythonSetOmnifunc=pythoncomplete#complete autocmd FileType python setlocal completeopt-=previewautocmd FileType javascrīptSetOmnifunc=javascriptcomplete#completejs autocmd FileType HTMLSetOmnifunc=htmlcomplete#completetags autocmd FileType cssSetOmnifunc=csscomplete#completecss autocmd FileType XMLSetOmnifunc=xmlcomplete#completetags autocmd FileType phpSetOmnifunc=phpcomplete#completephp autocmd FileType cSetOmnifunc=ccomplete#complete

My vim configuration (ycm not in effect) notes later study

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.