Convert Figma logo to code with AI

tpope logovim-pathogen

pathogen.vim: manage your runtimepath

12,117
1,161
12,117
27

Top Related Projects

33,891

:hibiscus: Minimalist Vim Plugin Manager

Vundle, the plug-in manager for Vim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config

13,952

💤 A modern plugin manager for Neovim

:zap: Dark powered Vim/Neovim plugin manager

Quick Overview

Vim-pathogen is a plugin manager for Vim, created by Tim Pope. It simplifies the installation and management of Vim plugins by allowing each plugin to have its own directory, making it easier to add, remove, and update plugins without cluttering the main Vim directory.

Pros

  • Easy installation and management of Vim plugins
  • Keeps plugins isolated in their own directories
  • Simplifies the process of updating and removing plugins
  • Compatible with both Vim and Neovim

Cons

  • Requires manual installation of plugins (no automatic plugin installation)
  • Less feature-rich compared to some modern plugin managers like Vundle or vim-plug
  • May require additional configuration for some plugins to work properly
  • Not actively maintained (last commit was in 2020)

Getting Started

  1. Install pathogen:
mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
  1. Add the following to your ~/.vimrc:
execute pathogen#infect()
syntax on
filetype plugin indent on
  1. Install plugins by cloning them into ~/.vim/bundle:
cd ~/.vim/bundle
git clone https://github.com/tpope/vim-surround.git
  1. Restart Vim, and the newly installed plugin should be available for use.

Competitor Comparisons

33,891

:hibiscus: Minimalist Vim Plugin Manager

Pros of vim-plug

  • Parallel installation of plugins, resulting in faster setup
  • Built-in post-update hooks for plugin management
  • Supports on-demand loading of plugins for improved startup time

Cons of vim-plug

  • Requires manual installation and setup
  • More complex configuration compared to Pathogen's simplicity
  • May have compatibility issues with some older Vim versions

Code Comparison

vim-plug:

call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'junegunn/seoul256.vim'
call plug#end()

Pathogen:

execute pathogen#infect()
syntax on
filetype plugin indent on

Key Differences

  • vim-plug uses a more declarative syntax for plugin management
  • Pathogen focuses on runtime path manipulation, while vim-plug offers a complete plugin management solution
  • vim-plug provides more advanced features like lazy-loading and post-update hooks

Use Cases

  • vim-plug: Ideal for users who want a feature-rich, all-in-one plugin manager with advanced capabilities
  • Pathogen: Better suited for those who prefer a minimalist approach and want to manage plugins manually

Community and Maintenance

  • vim-plug: Actively maintained with frequent updates and a large user base
  • Pathogen: Stable but less frequently updated, with a long-standing reputation in the Vim community

Both plugins have their merits, and the choice between them often comes down to personal preference and specific needs of the user.

Vundle, the plug-in manager for Vim

Pros of Vundle.vim

  • Automated plugin installation and updates
  • Supports searching and installing plugins directly from GitHub
  • Configurable through .vimrc file, making it easier to manage plugins across multiple machines

Cons of Vundle.vim

  • Requires more setup and configuration compared to vim-pathogen
  • Can be slower to load plugins, especially with a large number of them
  • May conflict with other plugin managers if used simultaneously

Code Comparison

vim-pathogen:

execute pathogen#infect()
syntax on
filetype plugin indent on

Vundle.vim:

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
" Add other plugins here
call vundle#end()
filetype plugin indent on

vim-pathogen uses a simpler approach, automatically loading plugins from the ~/.vim/bundle directory. Vundle.vim requires more configuration but offers greater control over plugin management. Both tools aim to simplify Vim plugin management, with vim-pathogen focusing on simplicity and Vundle.vim providing more features at the cost of complexity.

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config

Pros of packer.nvim

  • Designed specifically for Neovim, offering better integration and performance
  • Supports lazy loading of plugins, improving startup time
  • Provides a declarative configuration syntax in Lua

Cons of packer.nvim

  • Limited compatibility with Vim (only works with Neovim)
  • Steeper learning curve, especially for users unfamiliar with Lua
  • Relatively newer project with potentially fewer community resources

Code Comparison

pathogen:

execute pathogen#infect()
syntax on
filetype plugin indent on

packer.nvim:

require('packer').startup(function()
  use 'wbthomason/packer.nvim'
  use 'neovim/nvim-lspconfig'
  use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
end)

Summary

pathogen is a simple and lightweight plugin manager for Vim and Neovim, focusing on easy installation and runtime path management. It's widely compatible and has a large user base.

packer.nvim is a modern plugin manager built specifically for Neovim, offering advanced features like lazy loading and a Lua-based configuration. While it provides better performance and integration with Neovim, it has a steeper learning curve and is not compatible with Vim.

Choose pathogen for simplicity and wide compatibility, or packer.nvim for advanced features and better Neovim integration.

13,952

💤 A modern plugin manager for Neovim

Pros of lazy.nvim

  • Lazy loading capabilities, improving startup time and performance
  • Built-in plugin management with dependency resolution
  • Advanced features like automatic plugin updates and profiling

Cons of lazy.nvim

  • More complex configuration compared to vim-pathogen's simplicity
  • Requires Neovim 0.8.0 or later, limiting compatibility with older setups
  • Steeper learning curve for users new to advanced plugin management

Code Comparison

vim-pathogen:

execute pathogen#infect()
syntax on
filetype plugin indent on

lazy.nvim:

require("lazy").setup({
  "folke/which-key.nvim",
  { "folke/neoconf.nvim", cmd = "Neoconf" },
  "folke/neodev.nvim",
})

Summary

vim-pathogen is a simple and lightweight plugin manager that uses Vim's native runtime path manipulation. It's easy to use and works with both Vim and Neovim. lazy.nvim, on the other hand, is a modern plugin manager specifically designed for Neovim, offering advanced features like lazy loading, automatic updates, and dependency management. While lazy.nvim provides more functionality and potential performance improvements, it comes with a steeper learning curve and requires a more recent version of Neovim.

:zap: Dark powered Vim/Neovim plugin manager

Pros of dein.vim

  • Lazy loading: Loads plugins on-demand, improving startup time
  • Asynchronous plugin management: Faster installation and updates
  • More advanced features like caching and custom hooks

Cons of dein.vim

  • Steeper learning curve: More complex configuration and setup
  • Requires Vim 8.0+ or Neovim for full functionality
  • Less widespread adoption compared to Pathogen

Code Comparison

dein.vim configuration:

call dein#begin(expand('~/.vim/bundles'))
call dein#add('Shougo/dein.vim')
call dein#add('tpope/vim-fugitive')
call dein#end()

Pathogen configuration:

execute pathogen#infect()
syntax on
filetype plugin indent on

Summary

dein.vim offers more advanced features and better performance, particularly for users with many plugins. It's ideal for those who want fine-grained control over plugin loading and are comfortable with more complex configurations. Pathogen, on the other hand, is simpler to set up and use, making it a good choice for beginners or those who prefer a straightforward approach to plugin management. Both tools effectively solve the problem of Vim plugin management, but cater to different user preferences and needs.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

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.

For new users, I recommend using Vim's built-in package management instead. :help packages

Installation

Install to ~/.vim/autoload/pathogen.vim. Or copy and paste the following into your terminal/shell:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

If you're using Windows, change all occurrences of ~/.vim to ~\vimfiles.

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'. Observe:

cd ~/.vim/bundle && \
git clone https://github.com/tpope/vim-sensible.git

Now sensible.vim is installed. If you really want to get crazy, you could set it up as a submodule in whatever repository you keep your dot files in. I don't like to get crazy.

If you don't like the directory name bundle, you can pass a runtime relative glob as an argument:

execute pathogen#infect('stuff/{}')

The {} indicates where the expansion should occur.

You can also pass an absolute path instead. I keep the plugins I maintain under ~/src, and this is how I add them:

execute pathogen#infect('bundle/{}', '~/src/vim/bundle/{}')

Normally to generate documentation, Vim expects you to run :helptags on each directory with documentation (e.g., :helptags ~/.vim/doc). Provided with pathogen.vim is a :Helptags command that does this on every directory in your 'runtimepath'. If you really want to get crazy, you could even invoke Helptags in your vimrc. I don't like to get crazy.

Finally, pathogen.vim has a rich API that can manipulate 'runtimepath' and other comma-delimited path options in ways most people will never need to do. If you're one of those edge cases, look at the source. It's well documented.

Native Vim Package Management

Vim 8 includes support for package management in a manner similar to pathogen.vim. If you'd like to transition to this native support, pathogen.vim can help. Calling pathogen#infect() on an older version of Vim will supplement the bundle/{} default with pack/{}/start/{}, effectively backporting a subset of the new native functionality.

Runtime File Editing

:Vopen, :Vedit, :Vsplit, :Vvsplit, :Vtabedit, :Vpedit, and :Vread have all moved to scriptease.vim.

FAQ

Can I put pathogen.vim in a submodule like all my other plugins?

Sure, stick it under ~/.vim/bundle, and prepend the following to your vimrc:

runtime bundle/vim-pathogen/autoload/pathogen.vim

Or if your bundles are somewhere other than ~/.vim (say, ~/src/vim):

source ~/src/vim/bundle/vim-pathogen/autoload/pathogen.vim

Will you accept these 14 pull requests adding a .gitignore for tags so I don't see untracked changes in my dot files repository?

No, but I'll teach you how to ignore tags globally:

git config --global core.excludesfile '~/.cvsignore'
echo tags >> ~/.cvsignore

While any filename will work, I've chosen to follow the ancient tradition of .cvsignore because utilities like rsync use it, too. Clever, huh?

What about Vimballs?

If you really must use one:

:e name.vba
:!mkdir ~/.vim/bundle/name
:UseVimball ~/.vim/bundle/name

Why don't my plugins load when I use Vim sessions?

Vim sessions default to capturing all global options, which includes the 'runtimepath' that pathogen.vim manipulates. This can cause other problems too, so I recommend turning that behavior off:

set sessionoptions-=options

Contributing

If your commit message sucks, I'm not going to accept your pull request. I've explained very politely dozens of times that my general guidelines are absolute rules on my own repositories, so I may lack the energy to explain it to you yet another time. And please, if I ask you to change something, git commit --amend.

Beyond that, don't be shy about asking before patching. What takes you hours might take me minutes simply because I have both domain knowledge and a perverse knowledge of Vim script so vast that many would consider it a symptom of mental illness. On the flip side, some ideas I'll reject no matter how good the implementation is. "Send a patch" is an edge case answer in my book.

Self-Promotion

Like pathogen.vim? Follow the repository on GitHub and vote for it on vim.org. And if you're feeling especially charitable, follow tpope on Twitter and GitHub.

License

Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. See :help license.