零、参考文献:
https://www.jianshu.com/p/f0513d18742a
一、安照我的配置:保存文件
" Configuration file for vimset modelines=0 " CVE-2007-2438" Normally we use vim-extensions. If you want true vi-compatibility" remove change the following statementsset nocompatible " Use Vim defaults instead of 100% vi compatibilityset backspace=2 " more powerful backspacingset showtabline=0let g:solarized_termcolors=256colorscheme torteset background=dark" Don't write backup file if vim is being called by "crontab -e"au BufWrite /private/tmp/crontab.* set nowritebackup nobackup" Don't write backup file if vim is being called by "chpass"au BufWrite /private/etc/pw.* set nowritebackup nobackupset fileformat=unixset scrolloff=5set laststatus=2set matchtime=5set incsearchset hlsearchset autoreadset cursorlineset cursorcolumnset whichwrap+=<,>,h,lset noexpandtabset nowrapset guifont=Monaco:h13set cindentset guioptions-=rset guioptions-=Lset guioptions-=blet skip_defaults_vim=1set showmatchset numberset tabstop=4set autoindentsyntax onset shiftwidth=4set encoding=utf-8set completeopt=preview,menuset mouse=afiletype offset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()Plugin 'VundleVim/Vundle.vim'"Plugin 'Valloric/YouCompleteMe'Plugin 'Lokaltog/vim-powerline'Plugin 'scrooloose/nerdtree'Plugin 'Yggdroot/indentLine'Plugin 'jiangmiao/auto-pairs'Plugin 'tell-k/vim-autopep8'Plugin 'scrooloose/nerdcommenter'call vundle#end()filetype plugin indent on"F2开启和关闭树"map:NERDTreeToggle let NERDTreeChDirMode=1"显示书签"let NERDTreeShowBookmarks=1"设置忽略文件类型"let NERDTreeIgnore=['\~$', '\.pyc$', '\.swp$']"窗口大小"let NERDTreeWinSize=25"缩进指示线"let g:indentLine_char='┆'let g:indentLine_enabled = 1"autopep8设置"let g:autopep8_disable_show_diff=1let mapleader=','map ci map :w :call RunPython() function RunPython() let mp = &makeprg let ef = &errorformat let exeFile = expand("%:t") setlocal makeprg = python\ -u set efm=%C\ %.%#, %A\ \ File\ \"%f\"\\,\ line\ %l%,%#,%Z%[%^\ ]%\\@=%m silent make % copen let &makeprg = mp let &errorformat = efendfunction
文件保存到~/.vimrc
1 git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim2 然后打开vim3 :PluginInstall