[Tools] Vim插件管理

我们在使用插件的时候,都不希望插件安装的很杂乱,它不是一个看不见的黑盒,也为了下次方便在其它地方安装。

由于要方便插件管理,于是有了 Vundle,以下做些介绍:

1. 一个插件管理器, 自己本身也是插件, 这是必需工具:

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

2. Vundle 在 .vimrc 中通过以下配置项来管理其它插件:

"##################################/ Vundle.vim ###################################

" https://github.com/VundleVim/Vundle.vim

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 ‘scrooloose/nerdtree‘ " 目录树,https://github.com/scrooloose/nerdtree/blob/master/doc/NERD_tree.txt

" 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

"##################################/ Vundle.vim ###################################

" 映射ctrl+v 到:NERDTreeToggle+回车
map <C-V> :NERDTreeToggle<CR>

配置含义和常规命令在上面的注释里写的很清楚,有必要仔细看一下.

3. 终端输入vim打开空白页,用 :PluginInstall 安装配置中的插件;如需卸载,先把插件名注释掉,用 :PluginClean 卸载.

上面只是些介绍,配置好的文件在这里:https://github.com/farwish/vimrc.git,将目录内的 .vimrc 覆盖当前用户的,然后进行安装.

学会了这种配置方式,找些强大的插件,也许就不需要IDE了.

@黑眼诗人  <farwish.com>

Link: http://www.cnblogs.com/farwish/p/5792884.html

时间: 2024-08-25 17:14:50

[Tools] Vim插件管理的相关文章

vim插件管理 - vim-plug

vim-plug是一款轻量的vim插件管理工具. GitHub:https://github.com/junegunn/vim-plug 插件的安装 unix curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 或者直接下载,然后移动到~/.vim/autoload/下. 配置 编辑~/.vimrc,将以下复制到其中

vim插件管理之Vundle

Vim是一个类似于Vi的著名的功能强大.高度可定制的文本编辑器,在Vi的基础上改进和增加了很多特性.正是由于其可定制的特性, 许许多多的Vim插件便诞生了.管理这些插件又成为我们最为头疼的问题,最近无意中发现了Vundle----其特色在于使用git来管理插件, 更新方便,支持搜索,一键更新,从此只需要一个vimrc走天下.那么下面我们就来看看如何安装和配置Vundle: 1.在用户根目录下创建.vim/bundle目录(如果在用户根目录没有的这些目录的话) 2.将vundle拷贝到./vim/

Vim插件管理器Vundle使用

http://www.linuxidc.com/Linux/2012-12/75684.htm Vundle(Vim bundle) 是一个vim的插件管理器. 其Github地址为: https://github.com/gmarik/vundle 如何使用Vundle  (个人使用环境为Ubuntu 12.10) 1. 从Github下载vundle到本地: $  git clone https://github.com/gmarik/vundle.git  ~/.vim/bundle/vu

Vim插件管理利器——Vundle

转自:http://blog.csdn.net/jiaolongdy/article/details/17889787/ Vundle是基于Git仓库的插件管理软件.Vundle将插件的安装简化为类似yum软件安装的过程,只要:BundleInstall插件就安装完了,:BundleClean之后插件就卸载了. 一.Vundle的安装和使用 1. Vundle的安装 $ git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vun

vim插件管理器Vundle

1.vim为什么需要插件管理器 按照正常的vim插件安装包括去官网下载.解压.拷贝到VIM的安装目录以及运行:help tags这几个步骤.这些步骤已经足够复杂,更加无法想象的是要更新或者删除一个插件时,因为它的文件分布在各个目录下,就比如Windows上的安装路径,Applicationdata,用户数据,注册表等等,除非你对VIM的插件机制和要删的插件了如直掌,否则你能难将它删除干净.所以一段时间之后,VIM的安装目录下简直就是一团乱麻,管理插件几乎成为了一项不可能完成的任务.插件管理器也是

vim插件管理-pathogen

pathogen 功能说明 一个插件包往往具备多种功能,每个文件根据Vim的路径约定会放置到不同的目录下,通用插件放到plugin下,语法高亮插件放到syntax下,自动加载插件放到autoload下,文件类型插件放到ftplugin下,编码格式插件的放到indent下......如果你是重度插件用户,你会发现在.vim主目录下会有一堆文件夹,无论是你想要安装新插件,还是想删除旧插件,都非常麻烦,你不得不在每个文件夹下找相关的vim文件. pathogen是管理插件的插件,主要用来解决上述问题.

vim 插件管理

1 进入自己的vim mkdir ./bundile/vundle 2 在vim同级中执行 git clone https://github.com/gmarik/vundle.git ./bundle/vundle   将一些插件文件 下载到./bundle/vundle中 3 编写自己的vim配置 set nocompatible " be iMproved filetype off " required! set rtp+=/Applications/MacVim.app/Con

Vim插件管理 -- Vundle

1 插件目录  -/.vim/bundle/ 没有可自行创建 2 安装Vundle  $ git clone https://github.com/VundleVim/Vundle.vim.git   -/.vim/bundle/Vundle.vim 3 配置插件  vi ~/.vimrc 添加: set nocompatible " be iMproved, required filetype off " required " set the runtime path to

VIM(一) VIM插件管理利器-vundle

有关VIM的文件网上一大堆,这里只是记录一下我新配置环境的步骤.以备查看参考.  安装配置vundle 第一步,创建VIM的目录和配置文件: 在-目录下,添加.vimrc文件和.vim/bundle/vundle目录. 第二步,在.vimrc中添加Vundle的配置内容: "use vundle to manage plugin filetype off set nocompatible set rtp+=~/.vim/bundle/vundle call vundle#rc() 注:最好是将这