Code Yarns β€πŸ‘¨β€πŸ’»
Tech Blog ❖ Personal Blog

How to install Vim plugins using Pathogen

πŸ“… 2010-Dec-09 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ pathogen, plugin, vim ⬩ πŸ“š Archive

Pathogen is a simple Vim plugin written by Tim Pope that makes managing plugin files easy. Typically, plugin files are scattered all over the plugin, autoload and doc subdirectories of vimfiles. It becomes hard to distinguish which .vim files belongs to which plugin. This makes updating or uninstalling plugins quite hard.

Pathogen allows the user to place the files of each plugin in their own private subdirectory. To update or uninstall a plugin, just manage that plugin’s subdirectory. By default, the root directory that Pathogen looks for is named bundle. At runtime, Pathogen forms a list of all these plugin subdirectories and appends them all to runtimepath, which is the path that Vim looks through for loading plugins.

Installation

  1. Place pathogen.vim in vimfiles/autoload directory.

  2. Add this line to your vimrc:

call pathogen#runtime_append_all_bundles()

Usage

  1. Create a bundle subdirectory inside the vimfiles subdirectory.

  2. Create a subdirectory inside bundle for each plugin you use. You can use the plugin name as the directory name.

1. For plugins that ship with a plugin-autoload-doc directory structure, just unzip the plugin files inside this subdirectory.


2. For plugins that ship as a single .vim file, create a further plugin or autoload subdirectory (as required) and place the plugin file in it.

Note: If you prefer that installation, updation and uninstallation of plugins be automated, check out the vim-addon-manager plugin.


Β© 2022 Ashwin Nanjappa β€’ All writing under CC BY-SA license β€’ 🐘 @codeyarns@hachyderm.io β€’ πŸ“§