[Tools] Vim插件管理
2024-08-25 00:02:36
我们在使用插件的时候,都不希望插件安装的很杂乱,它不是一个看不见的黑盒,也为了下次方便在其它地方安装。
由于要方便插件管理,于是有了 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了.
Link: http://www.cnblogs.com/farwish/p/5792884.html
最新文章
- 51. 顺时针打印矩阵[print matrix in clockwise direction]
- iOS CoreData primitive accessor
- Android JSON、GSON、FastJson的封装与解析
- oracle 表类型变量的使用
- Python检验一个文件是否存在,如果不在就自己填写内容。
- ORACLE常见错误代码的分析与解决
- 使用stdarg.h实现可变长度参数
- 对table的tr使用display:block显示colspan失效问题的解决
- Windows SEH学习 x86
- 在CentOS 7中安装与配置Tomcat-8方法
- Linux同步机制(二) - 条件变量,信号量,文件锁,栅栏
- Loadrunner11点击录制脚本无响应,IE页面弹不出——解决方案汇总
- 指令汇B新闻客户端开发(六) 浅谈屏幕适配解决方案
- LeetCode刷题-005最长回文子串
- java-数组排序--计数排序、桶排序、基数排序
- Elastic Stack初篇-Logstash
- centos7安装mysql8
- CodeForces - 1102A
- python入门之小栗子
- VMware激活密钥
热门文章
- Redis中的简单事物以及消息订阅发布
- 文法 LL1
- Django Web补充
- 1.1. 如何使用XproerUI库
- php面向对象之final的应用
- 1.springMVC+spring+Mybatis的整合思路
- Spark 读取HBase和SolrCloud数据
- spring mvc 第一天【注解实现springmvc的基本配置】
- ios面试技巧
- Spring Framework------>;version4.3.5.RELAESE----->;Reference Documentation学习心得----->;关于spring framework中的beans