插件管理工具vunble
安裝git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim .vimrc 加入以下内容
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
" Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
目錄管理器
安裝git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
" 屬性目錄結構管理器
Bundle 'The-NERD-tree'
Bundle 'The-NERD-Commenter'
" 設定打開tree快捷鍵:
map :NERDTreeMirror
map :NERDTreeToggle
" 在 vim 啟動的時候預設開啟 NERDTree(autocmd 可以縮寫為 au)
"autocmd VimEnter * NERDTree
配色方案
下載下傳配色檔案 git clone https://github.com/tomasr/molokai.git 然後把裡面的colors複制到.vim/下面
在.vimrc中添加
syntax on
colorscheme molokai
set t_Co=265
set background=dark
狀态欄
在.vimrc中添加
" Airline: 小巧美觀的狀态欄。
Plugin 'bling/vim-airline'
文法高亮
在.vimrc中添加
" MATLAB/MATLAB-fold: MATLAB 文法高亮及代碼折疊插件。
Plugin 'djoshea/vim-matlab'
Plugin 'djoshea/vim-matlab-fold'
tab代碼補全
下載下傳檔案http://www.vim.org/scripts/script.php?script_id=1643
在.vimrc中執行:UseVimball ~/.vim然後添加 let g:SuperTabDefaultCompletionType="context"
自動添加括号,引号
在.vimrc中添加
Plugin 'jiangmiao/auto-pairs'
文法檢測
在.vimrc中添加
Plugin 'scrooloose/syntastic'
最後執行BundleInstall,PluginInstall