Vim learning notes (2) -- vim configuration and vim learning Notes configuration
Record vim configurations and update them at any time
MacVim
Installation:
Plugin vundle
- Note: Install plug-ins for other plug-ins in vim.
- Install: git clone https://github.com/gmarik/vundle.git ~ /. Vim/bundle/vundle, add the configuration in./vimrc: Bundle 'gmarik/vundle '. (/. Vim/bunle is the vim plug-in directory)
- Usage:
- Bundleinstall: Install the plug-in, BundleIstall 'author/projectname'
- BundleList: list the currently installed plug-ins
- BundleUpdate: update the plug-in
- BundleSearch: Search plug-in
- BUndleClean: Clear the plug-in
NERDTree
- Description: Tree Structure directory
- Installation: Use vundle to install
- Configuration: In. vimrc, set the shortcut key: nmap: NERDTreeToggle.
YouCompleteMe
- Note: Automatic completion of Multiple Programming Languages
- Installation: Use vundle to install
Supertab
- Note: Use tab to complete, instead of ctrl + p, ctrl + n
- Installation: Use vundle to install
. Vimrc Configuration
Filetype off "required! Filetype plugin indent oncolorscheme molokai "Vundle" call vundle # rc () "let Vundle manage VundleBundle 'gmarik/vundle 'bundle' scrooloose/nerdtree 'nmap <F2>: NERDTreeToggle <CR> Bundle 'valloric/YouCompleteMe 'bundle' ervandew/supertab 'set nocompatible "be iMprovedset rtp + = ~ /. Vim/bundle/vundle/set fencs = UTF-8, chinesesyntax on "enable syntax highlighting set showmatchset autoindentset smartindentset tabstop = 4 set shiftwidth = 4 set nu" display row number set mouse = a "set mouse position cursor" set pastetoggle = <F10> "set paste mode shortcut key "set clipboard = unnamed" vim clipboard and system clipboard adaptation "" brackets auto-completion "inoremap (() <ESC> iinoremap [[] <ESC> iinoremap {{}< ESC> iinoremap "" <ESC> iinoremap ''' <ESC> I "Youcompleteme config" let g: ycm_global_ycm_extra_conf = '/Use Rs/zhengjt /. vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm /. ycm_extra_conf.py '"python F5 to run" au BufRead *. py map <buffer> <F5 >:w <CR> :! /Usr/bin/env python % <CR>