Manage Vim Plugin With Pathogen

pathogen.vim是一款简化Vim插件管理的工具,通过它可以在独立的目录中轻松安装和管理Vim插件及运行时文件。本文介绍了如何安装pathogen.vim并配置vimrc来实现插件的自动加载。

pathogen.vim Manage your 'runtimepath' with ease. In practical terms, pathogen.vim makes it super easy to install plugins and runtime files in their own private directories.

Installation

Install to ~/.vim/autoload/pathogen.vim. Or copy and paste:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \

curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Runtime Path Manipulation

Add this to your vimrc:

execute pathogen#infect()

If you're brand new to Vim and lacking a vimrc, vim ~/.vimrc and paste in the following super-minimal example:

execute pathogen#infect()

syntax on

filetype plugin indent on

Now any plugins you wish to install can be extracted to a subdirectory under ~/.vim/bundle, and they will be added to the 'runtimepath'.

An Example to Install a Plugin

cd ~/.vim/bundle && \

git clone git://github.com/tpope/vim-sensible.git

Now sensible.vim is installed.

References

Technorati 标签: vim, plugin

转载于:https://www.cnblogs.com/luckysimple/p/5061571.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值