用Vundle管理Vim插件
作为程序员,一个好用的Vim,是极其重要的,而插件能够使原本功能羸弱的Vim变得像其他功能强大的IDE一样好用。然而下载、配置插件的过程比较繁琐,大家往往需要自己进行下载/配置等操作,如果还涉及到更新/删除插件,那就更麻烦了。
幸运的是我们有Vundle来管理Vim插件。Vundle本身就是个Vim插件,有了这个插件,我们只需要配置好~/.vimrc这个文件,就可以通过命令管理其他Vim插件了,非常好用。下面我们就介绍如何使用它吧!(以下都是在Linux系统内操作)
如何安装:
Step1: 直接用git,将Vundle下载下来。
$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Step2: 配置插件(Plugins)。 将下面的配置信息写到你的.vimrc文件中(一般情况下,我们vimrc的路径为"~/.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
Step3: 安装插件,打开vim,运行如下命令即可安装。
:PluginInstall
Step4: 查看安装状态
. Plugin 'VundleVim/Vundle.vim'
. Plugin 'tpope/vim-fugitive'
. Plugin 'rstacruz/sparkup'
+ Plugin 'tomasr/molokai'
+ Plugin 'scrooloose/nerdtree'
+ Plugin 'Lokaltog/vim-powerline'
+ Plugin 'bling/vim-airline'
+ Plugin 'SublimeText/CTags'
+ Plugin 'Valloric/YouCompleteMe'
+ Plugin 'majutsushi/tagbar'
执行完Step3的命令后,会显示上面的安装进度,下面是如何读懂安装进度的说明。
'.'代表已经此前安装过的插件。
'+'代表本次安装的插件。
确认安装完成后,用命令":q"退出即可。
Step5: 添加/删除插件。
下面介绍几个好用的插件:
Plugin 'tomasr/molokai' 好用的配色
Plugin 'scrooloose/nerdtree' 方便文件管理
Plugin 'Lokaltog/vim-powerline' 下方的状态
Plugin 'bling/vim-airline' 好看的配色
Plugin 'SublimeText/CTags' 有tags方便补全
Plugin 'Valloric/YouCompleteMe' 功能强大的补全
Plugin 'majutsushi/tagbar' 显示变量和函数名
比如我们想添加 'tomasr/molokai'这个插件,只需要把 Plugin 'tomasr/molokai'添加到.vimrc中有关Plugin插件的那一段中,然后执行:PluginInstall命令安装就好。
如果想删除插件,同理。
参考链接:
如何在Linux上使用vundle管理vim插件 https://linux.cn/article-9416-1.html
用Vundle管理Vim插件的更多相关文章
- 使用Vundle管理Vim插件
附:仓库地址 附:我自用的vim配置文件,里面注释很多,仅供参考. Vundle是一款Vim的插件管理软件(Linux),用起来很方便的原因有几点: 支持插件超多,可以来源于github.Vundle ...
- 使用pathogen管理Vim插件并托管到Github
参照文章[1][2]的办法,将vim打造成一个Python开发环境.文章中使用的是 pathogen + git 来管理 Vim 插件的.对这种方式还不太明白的同学可以参考[3]中的介绍.pathog ...
- [vundle]利用vundle工具来管理vim插件
转自:http://os.51cto.com/art/201507/484174.htm Vim是Linux上一款用途广泛的轻量级文本编辑工具.虽然对普通的Linux用户来说开始学用起来难度相当大,但 ...
- 菜鸟vimer成长记——第4.0章、Vim插件管理利器-Vundle
定义 Vundle是vim bunler和简称,它是一个vim插件管理器. Vim本身缺乏对插件的有效管理,安装插件并配置.vimrc文件非常不便.gmarik受到Ruby的bunler的启发,开发了 ...
- vundle 管理插件
前言:如果不使用vundle的话,进行插件的安装,配置和管理相对会麻烦,曾经没使用vundle的时候我经常遇到无法安装一些vim插件.但使用vundle后你只要在文件中添加一行你的插件名再安装就OK了 ...
- 常用vim插件的安装、使用和管理
1.Ctags Ctags工具是用来遍历源代码文件生成tags文件,这些tags文件能被编辑器或者其他工具用来快速查找定位源代码中的符号,入变量名,函数名等.比如,tags文件就是Taglist和 ...
- vim插件和配置
vim插件和配置 插件 pathogen 可以方便地管理vim插件 在没有pathogen的情况下,vim插件的文件全部都放在.vim目录,卸载插件很麻烦,pathogen可以将不同的插件放在一个单独 ...
- vim插件安装总结
vim插件安装总结 vim 插件 vundle 插件对于vim来说是一个杀手级别的神器助手,能自动补全,语法高亮,文件搜索等等,有效地提升了编程效率.下面就个人的一些安装和使用进行一个总结. 自动管理 ...
- 【原创】vim插件安装简介
一.安装vundle(vim插件管理软件): git clone https://github.com/VundleVim/Vundle.vim 拷贝目录到 ~/.vim/bundle/Vundle. ...
随机推荐
- UVA 12118 Inspector's Dilemma(连通性,欧拉路径,构造)
只和连通分量以及度数有关.不同连通分量只要连一条边就够了,连通分量为0的时候要特判.一个连通分量只需看度数为奇的点的数量,两个端点(度数为奇)是必要的. 如果多了,奇点数也一定是2的倍数(一条边增加两 ...
- hdu-2255 奔小康赚大钱---KM模板
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2255 题目大意: Problem Description 传说在遥远的地方有一个非常富裕的村落,有一 ...
- fopen, fdopen, freopen - 打开流
SYNOPSIS (总览) #include <stdio.h> FILE *fopen(const char *path, const char *mode); FILE *fdopen ...
- Problem A: 李白打酒
Problem A: 李白打酒 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 825 Solved: 373[Submit][Status][Web ...
- 使用pip 提示UnicodeDecodeError: 'ascii' codec can't decode解决方法
python目录 Python27\Lib\site-packages 建一个文件sitecustomize.py 内容写: import sys sys.setdefaultencoding('gb ...
- CUDA 中dim3含义
- java算法面试题:递归算法题1
递归算法题1 一个整数,大于0,不用循环和本地变量,按照n,2n,4n,8n的顺序递增,当值大于5000时,把值按照指定顺序输出来.例:n=1237则输出为:1237,2474,4948,9896,9 ...
- c++中 endl的意思?
endl是 end line的意思,表示此行结束,换行,就是回车
- CentOS7 ngnix 的安装和配置
刚开始我也在纠结到底是该用Apache呢还是Nginx?然后网上各种查看了它俩的对比,总结了它俩最大区别在于apache是同步多进程模型,在处理动态有优势:nginx是异步的,并发性能比较好,cpu内 ...
- form中 单选框 input[type="radio"] 分组
在form中有时候需要给单选框分组,这种情况下 可以通过给单选框设置相同的name来进行分组: <html> <head> <title> </title&g ...