Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pathogen.vim: manage your runtimepath

License

NotificationsYou must be signed in to change notification settings

tpope/vim-pathogen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

For new users, I recommend using Vim's built-in package managementinstead.: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 pastein the following super-minimal example:

execute pathogen#infect()syntax onfiletype plugin indent on

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

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

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

If you don't like the directory namebundle, you can pass a runtime relativeglob 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:helptagson each directory with documentation (e.g.,:helptags ~/.vim/doc).Provided with pathogen.vim is a:Helptags command that does this onevery directory in your'runtimepath'. If you really want to getcrazy, you could even invokeHelptags in your vimrc. I don't like toget crazy.

Finally, pathogen.vim has a rich API that can manipulate'runtimepath'and other comma-delimited path options in ways most people will neverneed 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 topathogen.vim. If you'd like to transition to this native support,pathogen.vim can help. Callingpathogen#infect() on an older version of Vimwill supplement thebundle/{} default withpack/{}/start/{}, effectivelybackporting a subset of the new native functionality.

Runtime File Editing

:Vopen,:Vedit,:Vsplit,:Vvsplit,:Vtabedit,:Vpedit, and:Vread have all moved toscriptease.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 yourvimrc:

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 fortags so I don't see untracked changes in my dot files repository?

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

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

While any filename will work, I've chosen to follow the ancienttradition 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 problemstoo, so I recommend turning that behavior off:

set sessionoptions-=options

Contributing

If yourcommit message sucks,I'm not going to accept your pull request. I've explained very politelydozens of times thatmy general guidelinesare absolute rules on my own repositories, so I may lack the energy toexplain it to you yet another time. And please, if I ask you to changesomething,git commit --amend.

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

Self-Promotion

Like pathogen.vim? Follow the repository onGitHub and vote for it onvim.org. And ifyou're feeling especially charitable, followtpope onTwitter andGitHub.

License

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

About

pathogen.vim: manage your runtimepath

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp