Vim Vundle 配置

Vim Vundle 配置

Set up Vim Vundle.

1.关于Vundle

About Vundle.
Vundle 是一个Vim的包管理工具,类似于sublime text,atom,oh-my-zsh的插件管理工具。
Vundle is a package manager of Vim. Just like packages manager of sublime text, atom, oh-my-zsh, etc.
Vundle的Github主页是[Vundle.vim][]
The index of Vundle is [Vundle.vim][]
[Vundle.vim]:https://github.com/VundleVim/Vundle.vim

2.配置Vundle

Set up Vundle.

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

将这些代码放到~/.vimrc文件中,如果没有这个文件需要自己创建。
Put the below codes into ~/.vimrc. If the docments is not exists, just creat one.

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

运行vim,在vim中使用以下命令:PluginInstall来安装插件,如果出现错误,将出错的那个插件注释掉或者删除即可。
Run vim and use :PluginInstall to install the plugins. Maybe it will come with some questions, just mark or remove the line of that plugin.

3.插件推荐

Plugin recommended.

Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'
Plugin 'nvie/vim-flake8'
Plugin 'pangloss/vim-javascript'
Plugin 'Raimondi/delimitMate'

在安装一些插件的时候也许会提示什么vim不是支持python什么的,是由于该插件由python编写,需要将Vim重新编译。(树莓派上直接apt install的vim就没有python支持,需要重新编译)
Maybe it will warn you that some plugin won't work due to no supported by python.You need to recompile the Vim(especially on raspberry pi).

推荐阅读更多精彩内容