Vim Configuration Memo

Source: Internet
Author: User
Tags git clone

First, the configuration platform

System: Xubuntu 14.04.1 32-bit

Vim:vim 7.4

Plugin management: Plug-in management with Vundle

Scope of application: Mainly used for C programming

Ii. preparatory work

1. Install VIM-SYNTAX-GTK (highlight)

sudo Install

2, install Vundle (plug-in management)

GitHub Address: Https://github.com/gmarik/Vundle.vim

$ git clone https://github.com/gmarik/vundle.vim.git ~/.vim/bundle/vundle.vim

If you don't have git installed, install git

sudo Install git

  

3. Create a new. vimrc file in the home directory

Touch . VIMRC

Enter the configuration information (some configuration will be discussed later)

"************************************"General Configuration *"************************************"turn off VIM consistency principleSet Nocompatible"Show Line NumbersSet number"sets the row and column information for the cursor in the lower-right corner of the editing processSet Ruler"Show the command being entered in the status barSet ShowCmd"Set History bar numberSet history= +"set cancel Backup to prevent temporary file generationSet Nobackupset noswapfile"setting the matching modeSet Showmatch"set up a C + + mode for automatic alignmentSet Autoindentset cindent"turn on the syntax highlighting featuresyntax Enablesyntax on"Specify a color scheme of 256 colorsSet t_co= the"Ignore case when setting searchSet ignorecase"Configure how the BACKSPACE worksSet backspace=Indent,eol,start"settings can be used with the mouse in VimSet mouse=a"Set Tab WidthSet tabstop=4"set the number of auto-ZilinSet shiftwidth=4"You can delete 4 spaces when you set the backspace barSet Smarttabset softtabstop=4"automatically convert the TAB key to a spaceSet Expandtab"Setting the Encoding methodSet encoding=utf-8"automatically determine the encoding when you try the following code in turnSet fileencodings=ucs-bom,utf-8, cp936,gb18030,big5,euc-jp,euc-kr,latin1"do not detect file typesfiletype off"take different indents for different filesfiletype indent on"Allow pluginsfiletype plugin on"*********************************************************"vundle Configuration *"*********************************************************Set RTP+=~/.vim/bundle/vundle.vimcall vundle#begin ()"Let Vundle manage Vundle, requiredPlugin'Gmarik/vundle.vim'"My Plugins are herePlugin'tpope/vim-fugitive'Plugin'L9'Plugin'A.vim'Plugin'Auto-pairs'Plugin'Vim-scripts/taglist.vim'Plugin'The-nerd-tree'Plugin'syntastic'Plugin'Fuzzyfinder'Plugin'Lokaltog/vim-powerline'Plugin'Valloric/youcompleteme'Call vundle#end ()"Start Smart Completionfiletype plugin indent on"*****************************************************"taglist Configuration *"*****************************************************"does not display"Press F1 to display Help"Let tlist_compact_format=1"window appears on the rightLet tlist_use_right_window=1"Show only tags for the current fileLet tlist_show_one_file=1  "Highlight DisplayLet tlist_auto_highlight_tag=1"update automatically with filesLet tlist_auto_update=1"Set WidthLet Tlist_winwidth= -       "taglist window is the last window, exit vimLet tlist_exit_onlywindow=1 "Click JumpLet tlist_use_singclick=1"Turn off shortcut keysNnoremap <silent> <F8>:tlisttoggle<cr>"********************************************************"nerd_tree Configuration *"********************************************************"Display EnhancementsLet nerdchristmastree=1"Automatically adjust focusLet nerdtreeautocenter=1"Mouse Mode: directory Click, File double clickLet nerdtreemousemode=2"automatically close after opening a fileLet nerdtreequitonopen=1"Show FilesLet nerdtreeshowfiles=1"Show hidden filesLet nerdtreeshowhidden=1"highlight the current file or directoryLet nerdtreehightcursorline=1"Show Line NumbersLet nerdtreeshowlinenumbers=1"Window PositionLet nerdtreewinpos=' Left'"window WidthLet nerdtreewinsize= to"do not display ' Bookmarks ' label ' Press? for help 'Let nerdtreeminimalui=1"shortcut KeysNnoremap <silent> <F4>:nerdtreetoggle<cr>"*****************************************************"youcompleteme Configuration *"*****************************************************"leader map to Comma ","Let Mapleader =","  "Configuring the default ycm_extra_conf.pyLet g:ycm_global_ycm_extra_conf ='~/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'  "Press, JD will jump to definitionNnoremap <leader>jd:ycmcompleter gotodefinitionelsedeclaration<cr>"no longer asks if the ycm_extra_conf.py configuration is loaded when Vim is turned onLet g:ycm_confirm_extra_conf=0   "using the ctags generated tags fileLet G:ycm_collect_identifiers_from_tag_files =1 "*****************************************************"syntastic Configuration *"*****************************************************Let g:syntastic_check_on_open=1

  

Vim Configuration Memo

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.