165 Commits

Author SHA1 Message Date
Tim Pope ac4dd9494f Remove foldexpr from modeline
Resolves: https://github.com/tpope/vim-pathogen/pull/223
2022-08-24 13:21:07 -04:00
Geraint Edwards e0a3efbda5 Fix whitespace needed around colon-separated slice args 2021-01-04 12:35:31 -05:00
othree c6bc424045 Create LICENSE 2020-01-17 11:19:31 -05:00
Tim Pope a553410f1b Add sponsor button 2019-11-12 18:41:01 -05:00
Tim Pope e9fb0914db Soften deprecation warning to dampen chicken little reaction 2018-12-13 15:00:59 -05:00
Tim Pope 24f5cdd805 Add a deprecation notice 2018-12-12 10:38:22 -05:00
Tim Pope 06da921608 Fix confusing negative in contribution guidelines 2018-04-05 17:59:57 -04:00
Tim Pope f4fd6044e3 Rewrite contribution guidelines 2018-03-14 17:27:36 -04:00
Tim Pope e7857bed4e Avoid line continuations for 'compatible' interop 2017-08-04 19:36:41 -04:00
Tim Pope ddfb1f14d7 Document native package management support 2017-05-27 14:48:52 -04:00
Tim Pope 17f6f4d585 Drop deprecated API 2017-05-27 14:38:29 -04:00
Tim Pope 3ec671e112 Always skip pack/{}/start/{} when has('packages')
This lets you explicitly pass the path in for backwards compatibility
without worrying about the Vim version.
2017-05-23 17:45:54 -04:00
Tim Pope c636c19f6a Prioritize static paths in infect
The arguments to infect are reversed so that the earlier arguments show
up earlier in the load path.  This results in a lot of unintuitive
behaviors and I generally consider it to have been a mistake.  To
mitigate this, try pulling out the static, absolute paths and applying
them first.  You almost always want this, as it enables the expected
nesting in `pathogen#infect('~/Code/vim/', 'bundle/{}')`.
2017-05-23 17:34:51 -04:00
Tim Pope 39964dd295 Allow trailing slash to override {} deprecation check 2017-05-22 16:52:30 -04:00
Tim Pope 6655e33627 Expand tilde to home directory 2017-05-22 16:24:29 -04:00
Tim Pope 379b8f7082 Backport Vim packages support 2017-05-22 15:47:34 -04:00
Anhad Jai Singh 0f4710063e Minor change in install instructions in README
Clarify that the commands for installation are to be copy and pasted
into the terminal and not into their ~/.vimrc or something else.

Prompted by a user in #vim asking where he should paste the commands for
installation.
2017-05-03 10:49:49 -04:00
Tim Pope 020ab25c38 Remove :V commands for good
Closes https://github.com/tpope/vim-pathogen/issues/178
2017-02-13 16:16:56 -05:00
Santhosh Kumar Srinivasan 7ba2e1b67a Use https:// instead of git:// while cloning (#180)
Fixes #179
2016-10-13 11:17:15 -04:00
Tim Pope 8c91196cfd Fix path expansion issue on Windows
References https://github.com/tpope/vim-pathogen/issues/83
2016-01-26 14:10:25 -05:00
Tim Pope b4f20ff0ac Work around hang on very old Vim
Closes https://github.com/tpope/vim-pathogen/issues/136
2016-01-19 20:13:29 -05:00
Tim Pope 84a3dd0d81 Drop :Vedit 2015-12-25 19:56:20 -05:00
Tim Pope 4d584ea8c8 pathogen.vim 2.4
* Use $VIMBLACKLIST to temporarily disable bundles.
* Allow disabling rest of vimrc by adding it to blacklist.
* Expand bundle/{a,b} as bundle/a and bundle/b.
* Experimental: Support "vimfiles" subdirectory.
* Work around weird lockup on ancient Vim.
* Restore disabling of paths ending in ~.
2015-12-25 19:06:34 -05:00
Tim Pope 8b27115203 Update instructions for disabling bundle 2015-12-25 19:06:06 -05:00
Tim Pope 890e013d96 Fix handling of after directories
Closes https://github.com/tpope/vim-pathogen/issues/167
2015-12-22 12:35:35 -05:00
Tim Pope 68ead6af17 Remove old fold markers 2015-12-21 20:33:12 -05:00
Tim Pope e2f96ded89 Experimental: Support "vimfiles" subdirectory
In hindsight, I think dumping runtime files and directories directly
into the root of the repository was a mistake, as it mixes them in with
cruft like .gitignore and the README, not to mention not to mention
unrelated files in repos with a purpose other than just Vim runtime
files.  Admittedly, transitioning to an alternate structure at this late
stage is unlikely, but I'm adding preliminary support for it anyways as
a hedge.

The name "vimfiles" is used by Vim itself in a few places and in my
opinion is the only name worth considering.  I think enabling plugins to
choose their own subdirectory would just add unnecessary configuration
and overhead.
2015-12-21 20:31:13 -05:00
Tim Pope a6004fd531 Separate "after" parameter during expansion 2015-12-21 18:35:24 -05:00
Lifepillar b4174e4d1a Fix typo in pathogen#surround()
Closes https://github.com/tpope/vim-pathogen/issues/157
2015-09-20 15:25:20 -04:00
Tim Pope b9fb0dfd81 Drop obsolete caveat about {} 2014-11-06 13:41:58 -05:00
Tim Pope 91e6378908 Strip trailing slashes in blacklist 2014-07-19 23:20:27 -04:00
koalaman ed01fca95c Update install commands to use && instead of ;
This way, if mkdir or cd fails, it'll stop rather than continuing to
download or clone in the wrong directory.
2014-05-29 17:45:08 -04:00
Tim Pope 1b644bf4b2 Take control of download URL
There have been multiple reports of failure with the existing URL,
though I can't reproduce.

Closes #128.
2014-05-26 20:44:16 -04:00
Tim Pope 336611a3d0 Fix curl command to support GitHub's new redirect
Closes #120.
2014-04-25 17:28:22 -04:00
Tim Pope bff90d72a1 Work around weird lockup on ancient Vim
Closes #118.
2014-04-01 23:42:58 -04:00
Tim Pope 099b918141 Expand bundle/{a,b} as bundle/a and bundle/b 2014-03-26 13:37:29 -04:00
Tim Pope 5b5bee9c44 Restore disabling of paths ending in ~ 2014-03-25 10:46:35 -04:00
Tim Pope 9a40364c60 Use $VIMBLACKLIST to temporarily disable bundles
VIMBLACKLIST=vim-fugitive,vim-dispatch vim
2014-03-24 12:17:15 -04:00
Tim Pope e1687eb4d9 Allow disabling rest of vimrc 2014-03-23 19:49:18 -04:00
Tim Pope f66e6f483f Try a fold expression 2014-03-21 16:27:00 -04:00
Tim Pope bd0c1abcce pathogen.vim 2.3
* Deprecation warnings.
* Introduce pathogen#interpose() to replace incubate().
* Fix glob issues with fish shell.
* Silence all errors in :helptags.
2014-03-21 15:02:02 -04:00
Tim Pope 50531a4102 Make pathogen#uniq unofficial 2014-03-21 15:01:14 -04:00
Tim Pope 2d3784070d Move s:warn down with deprecations 2014-03-21 14:46:14 -04:00
Tim Pope 60c6fd24cf Move unofficial/deprecated functions to separate sections 2014-03-21 14:03:00 -04:00
Tim Pope af23f56f42 Fix message 2014-03-20 17:48:55 -04:00
Tim Pope a341581743 Fix zero arity invocation of runtime_append_all_bundles 2014-03-20 16:59:45 -04:00
Tim Pope 0230129c50 Steer people to pathogen#infect() in deprecations 2014-03-20 15:16:53 -04:00
Tim Pope 5cb9a24de8 Swap out deprecated functions for their replacements 2014-03-20 15:14:33 -04:00
Tim Pope d7be5c7712 Start renaming pathogen_disabled to pathogen_blacklist 2014-03-20 03:09:46 -04:00
Tim Pope 0f43888aba Don't redundantly filter ~ suffixes
This is already handled by glob() due to the 'suffixes' option
2014-03-20 02:59:22 -04:00
Tim Pope 8c54b5ec0d Alias pathogen#interpose() to incubate()
We can do better than cutesy.
2014-03-20 00:32:28 -04:00
Tim Pope 3bc4b397b2 Typo fix 2014-03-19 19:12:28 -04:00
Tim Pope 543041b3ca Better check for help files in doc directory 2014-03-19 12:38:40 -04:00
Tim Pope f45c82a760 Document session options limitations
References #16.
2014-03-18 22:40:55 -04:00
Tim Pope c9ca3770db Use a dictionary to track done bundles 2014-03-17 23:08:24 -04:00
Tim Pope 698239024b Ignore non-string arguments to infect
Allow for an options dictionary to be passed in the future.
2014-03-17 22:34:30 -04:00
Tim Pope 16a1a84072 pathogen#slash() alias for pathogen#separator() 2014-03-17 17:58:20 -04:00
Will Gray 1270dceb1f Update comment to match readme 2013-07-13 22:33:54 -04:00
Tim Pope f1926ab673 Use fnameescape not =... 2013-03-21 13:18:03 -04:00
Tim Pope 0c3769d94e Always warn on deprecated API 2013-03-21 13:12:08 -04:00
Tim Pope 2c14c6095e Silence errors in :helptags
Closes #90.
2013-03-21 13:11:43 -04:00
Tim Pope 3111f06b70 Add a CONTRIBUTING file
Leave the README section in place, as we link to it from all over the
place.
2013-03-10 16:07:37 -04:00
Tim Pope a517eed987 Fix glob issues with fish shell
Closes #83.
2013-02-27 20:42:14 -05:00
Tim Pope 74ae96483b Fix typo 2013-02-27 20:41:50 -05:00
Tim Pope 12c3483515 Fix typo in README
Closes #86.
2013-02-16 21:38:16 -05:00
Tim Pope f195ac5e40 pathogen.vim 2.2
* Accept multiple arguments to pathogen#infect().
* Fix errors in deprecated methods.
2013-01-14 17:54:17 -05:00
Maksim Ryzhikov 1050a784cc Fix error in pathogen#runtime_append_all_bundles 2013-01-14 16:22:57 -05:00
Tim Pope 6cfc5e7759 Fix errors on attempt to warn
Closes #81.
2013-01-14 13:30:43 -05:00
Tim Pope 1b7f130f57 Revert "Point README at stable release"
This reverts commit 95c285e426.
2013-01-13 23:27:54 -05:00
Tim Pope 98659f0af7 Fix multiple arguments to pathogen#infect 2013-01-13 23:17:14 -05:00
Tim Pope a860d000e1 Reveal multiple arguments form of pathogen#infect 2013-01-13 23:09:15 -05:00
Tim Pope 92ca2e574b Accept multiple arguments to pathogen#infect() 2013-01-13 22:55:33 -05:00
Tim Pope 95c285e426 Point README at stable release 2013-01-13 21:06:33 -05:00
Tim Pope a04bd7a195 pathogen.vim 2.1
* Deprecate :Vopen commands in favor of scriptease.vim.
* Deprecate pathogen#infect() calls on paths without explicit globs.
* Introduce pathogen#incubate().
* Deprecate pathogen#runtime_append_all_bundles().
* Introduce pathogen#surround().
* Deprecate pathogen#runtime_prepend_subdirectories().
* Allow absolute paths in g:pathogen_disabled.
2013-01-13 20:27:34 -05:00
Tim Pope a1b2b09e6a Mention deprecation of runtime_prepend_subdirectories 2013-01-13 19:52:43 -05:00
Tim Pope a2f7e9b93f Change incubate to be consistent with surround 2013-01-13 19:45:39 -05:00
Tim Pope 6c741e636a Provide more actionable warnings 2013-01-13 19:17:00 -05:00
Tim Pope 0533e25018 Allow incubate('bundle/{}')
I don't know if this is going to be a supported API, but since this is a
transitional release, let's keep our options open.
2013-01-13 18:27:30 -05:00
Tim Pope 268c6a06c4 Don't use underscored markdown headers
These can confuse the syntax highlighter, and the === version looks like
a conflict marker.
2013-01-13 18:26:49 -05:00
Tim Pope 40dcd3743b Treat infect("~/foo/") as infect("/foo/{}") 2013-01-13 17:46:54 -05:00
Tim Pope 34eff0f3e4 Allow executing multiple commands 2013-01-13 12:56:59 -05:00
Tim Pope 5c657cbe99 Fix :Helptags for globs in path 2013-01-12 03:04:10 -05:00
Tim Pope 619f9ed386 Recommend *, not {}
This looks less weird.  People who want to disable can look it up in the
docs.
2013-01-12 02:55:39 -05:00
Tim Pope f79f1bb82b Clarify difference between {} and * 2013-01-12 02:49:44 -05:00
Tim Pope 54f9afb244 Allow wildcards in pathogen#infect() 2013-01-12 02:48:26 -05:00
Tim Pope bb6c0b8f5b Add missing abort declarations 2013-01-12 02:42:44 -05:00
Tim Pope 5eafb23d9b Don't truncate non-existent directory 2013-01-12 02:27:10 -05:00
Tim Pope d10ce854fc Strip trailing slashes is pathogen#surround() 2013-01-11 23:39:37 -05:00
Tim Pope 34b4567be4 Fix missing fold marker 2013-01-11 23:39:37 -05:00
Tim Pope f467f117c1 Fix typo 2013-01-11 23:20:27 -05:00
Tim Pope 07e7b35aef Actually try things before you commit 2013-01-11 23:12:29 -05:00
Tim Pope 6aa1bbf839 Introduce pathogen#surround() 2013-01-11 22:48:57 -05:00
Tim Pope df8f1b0b30 Rename pathogen#runtime_append_all_bundles
Better a cute name than a verbose yet still cryptic one.
2013-01-11 22:17:03 -05:00
Tim Pope 1fde396c57 Allow/encourage infect paths ending in /{}
I want to break this API.
2013-01-11 22:00:15 -05:00
Tim Pope 5bcf824e21 Formally deprecate :Vopen family 2013-01-11 21:33:02 -05:00
Tim Pope c0dbda5258 Allow disabling absolute path 2013-01-11 19:10:22 -05:00
Tim Pope da1c3c08ed Plug sensible.vim 2013-01-06 14:03:44 -05:00
Tim Pope 532f0ca7d9 Change :call to :execute
I have some ideas about uses for this, such as returning :finish if an
environment variable tells us to skip the vimrc.
2013-01-06 14:03:24 -05:00
Tim Pope 47523d9bc0 Allow for :exe pathogen#infect()
Idea: Return 'finish' here if an environment variable says to skip the
rest of the vimrc.
2013-01-01 21:29:22 -05:00
Tim Pope 1b46b4f991 Remove advice around filetype on
Closes #80.
2012-12-20 09:35:21 -05:00
Tim Pope e5f413f480 Promote scriptease.vim 2012-12-10 20:33:51 -05:00
Tim Pope 49e6d62fb1 Don't override existing :Vedit commands
Guess what my next plugin is going to be.
2012-11-11 10:55:39 -05:00
Tim Pope 96b5726ef3 Drop wget from install instructions
Who's in the wget-but-not-curl boat, anyways?
2012-09-24 13:21:17 -04:00
Tim Pope 11e39a169a Simplify modeline 2012-08-01 15:27:49 -04:00
Tim Pope 5e3fdd3a8a Fix :Vopen tab complete of a/b on Windows
Closes #70.
2012-07-30 11:37:01 -04:00
Tim Pope 2f9fd6de08 Fix :V* commands when file isn't found 2012-07-28 10:55:32 -04:00
Tim Pope 09f2c3b7d3 Fix the URL that GitHub broke
Closes #61.
2012-05-01 20:41:34 -04:00
Alex Efros c9fb89dd6e Fix error in :Helptags
Error happens if ~/.vim/doc/ doesn't contain
any files, but contain some subdirectories.
2012-02-23 16:47:04 -05:00
Tim Pope ab64b4ddd0 Support :Vedit on versions prior to 7.1.299 2011-11-06 02:23:33 -05:00
Tim Pope 00ce0614f0 Don't choke on :Vopen 123.txt
Closes #49.
2011-10-20 02:31:44 -04:00
Tim Pope 4462567926 Fix count argument to :V commands 2011-10-20 02:30:12 -04:00
mattn 4676508001 Expand path in complete candidates 2011-10-20 02:23:05 -04:00
Jared Grippe 7701d82201 Fix typo 2011-09-25 02:26:55 -04:00
Daniel Bolton a32131ce19 Chain install commands; fix curl opts/output 2011-09-18 02:23:45 -04:00
Tim Pope af1361a446 Clarify copyright 2011-09-18 02:23:45 -04:00
Tim Pope 9631019a3e Really fix pathogen#uniq() with empty strings 2011-08-27 17:41:34 -04:00
Tim Pope fbd0cc7040 Account for empty item in pathogen#uniq() 2011-08-27 17:30:22 -04:00
Tim Pope cb9717bba1 Provide cross-platform way to load from submodule
Closes #39.
2011-08-25 20:45:34 -04:00
Tim Pope 82cc6d795e Fix typo 2011-08-21 21:39:23 -04:00
Tim Pope 7804dbd8d5 Document lcd behavior of V commands 2011-08-21 14:55:11 -04:00
Tim Pope 97c27be992 Automatic lcd on :Vsplit, etc. 2011-08-21 14:45:09 -04:00
Maciej Konieczny dc26353727 Typo 2011-08-18 16:16:33 -04:00
Tim Pope b8e184638f Grammar fix 2011-08-18 16:16:33 -04:00
Anton Petrov fb16afe738 Fix hardcoded shellslashes for helptags() 2011-08-17 16:34:30 -04:00
Tim Pope 1e0c2b4393 Rename rtpfindfile to be consistent 2011-08-13 12:24:37 -04:00
Tim Pope ede9571bc3 pathogen.vim 2.0 2011-08-09 20:11:26 -04:00
Tim Pope 040ee8f432 Clean up opening comments 2011-08-09 19:49:15 -04:00
Tim Pope a9fcd31a7e Grammar fix 2011-08-09 19:26:50 -04:00
Tim Pope 3ff705c08e Provide :Vopen 2011-08-09 19:24:15 -04:00
Tim Pope 85040e24e8 Provide V family of commands 2011-08-09 18:38:33 -04:00
Tim Pope 09cf830c77 Spelling fix 2011-08-09 16:09:44 -04:00
Tim Pope 43f6273c3c Accept a full path to pathogen#infect()
This full path is passed to pathogen#runtime_prepend_subdirectories()
instead of pathogen#runtime_append_all_bundles().
2011-08-09 12:34:29 -04:00
Tim Pope 8c46ed160e Tighten $VIMRUNTIME exclusion in :Helptags 2011-08-05 11:46:26 -04:00
Tim Pope b356563fc8 Provide homepage, not email 2011-08-05 11:46:26 -04:00
Tim Pope 0abca7beba Move disabling logic out of glob 2011-08-02 22:59:56 -04:00
Tim Pope f1c0ee6166 Add a note about Vimballs. Closes #6 2011-08-02 22:55:50 -04:00
Tim Pope 0a8144bf3d Add a note about wget 2011-07-25 20:21:43 -04:00
Tim Pope dccb822c0a Add an example minimal vimrc 2011-07-25 19:56:42 -04:00
Tim Pope 3a4129f948 Use HTTPS for GitHub URLs in README 2011-07-25 17:42:51 -04:00
Tim Pope e06454cb49 Tighten curl install URL 2011-07-25 16:36:45 -04:00
Tim Pope 0d230bc4c6 Add a FAQ 2011-07-25 15:24:43 -04:00
Tim Pope 73ba356522 Make note of other comma-delimited path options 2011-07-25 01:57:15 -04:00
Tim Pope 8484839faa Fix typo 2011-07-24 21:01:56 -04:00
Tim Pope f56ab3149a Add License 2011-07-24 18:02:27 -04:00
Tim Pope e9ab337487 Typo 2011-07-24 17:56:40 -04:00
Tim Pope 568eec91d8 More explicit installation instructions 2011-07-24 17:55:20 -04:00
Tim Pope 72586074e5 Add a README 2011-07-24 17:35:26 -04:00
Lucas Parry fcf77f5101 Add option to call infect on non-standard paths
Tweak pathogen#infect to take an optional source path to load plugins
from, instead of the standard 'bundle' directory.
2011-06-13 23:05:31 -04:00
Tim Pope 50650f2531 Extract pathogen#cycle_filetype() 2011-05-13 23:42:40 -04:00
Seth Milliken b147125552 Add pathogen#infect() as primary entry point for basic setup 2011-05-13 20:03:20 -07:00
Tim Pope af5659596e Add :Helptags wrapper for pathogen#helptags() 2011-04-13 12:27:57 -04:00
Tim Pope 3e63bdb7c4 More accurate writability check for helptags 2011-04-13 12:27:57 -04:00
Tim Pope 552e5f0bf8 pathogen.vim 1.3 2011-03-10 17:50:22 -05:00
Tim Pope c8f5e6c63c Fix disabling /after in append_all_bundles
[Jeroen Budts]
2011-02-20 17:39:19 -05:00
Tim Pope a50ad7c80e Fix disabling /after directories [Jeroen Budts] 2011-02-20 14:55:02 -05:00
Sebastian Jaeger 968e87ef7f Skip empty directories in pathogen#helptags() 2010-11-07 12:44:24 -05:00
Tim Pope 52b091892c Fix broken function reference 2010-10-24 17:02:50 -04:00
Mathias Gumz 258c47fe06 Exclude bundles in g:pathogen_disabled 2010-10-24 12:48:53 -04:00
Leonardo Luz Almeida f4f79bc720 Fix appending "after" directories on Windows 2010-05-16 20:12:46 -04:00
Tim Pope 9dc6d067fb pathogen.vim 1.2 2010-01-16 19:33:07 -05:00
Tim Pope 40d808db13 Add email address 2010-01-16 18:53:32 -05:00
Tim Pope 720561a037 Add pathogen#uniq() 2010-01-16 16:30:47 -05:00
Tim Pope 7d171d5bd8 Consistently punctuate documentation 2010-01-16 16:14:10 -05:00
Tim Pope c2032bdd90 Add pathogen#helptags() 2010-01-15 02:45:42 -05:00
Tim Pope c3675bda5e Add pathogen#legacyjoin()
Older options like 'path' require you to escape spaces and newer ones
like 'runtimepath' break if you do.  This commit fixes join to not
escape spaces and adds legacyjoin to escape them.
2010-01-14 18:17:07 -05:00
5 changed files with 468 additions and 50 deletions
+2
View File
@@ -0,0 +1,2 @@
github: tpope
custom: ["https://www.paypal.me/vimpope"]
+18
View File
@@ -0,0 +1,18 @@
Follow the commit message guidelines at [commit.style](https://commit.style).
This is an absolute requirement for my repositories, and doing so proves you
actually read the contribution guidelines, which makes for a good first
impression.
Good commit messages imply good commits. Pull requests should typically be a
single commit, or for the rare complicated case, a series of atomic commits.
If I request a change, use `git commit --amend` or `git rebase --interactive`
and force push to your branch.
For feature requests, don't be shy about proposing it in an issue before
drafting a patch. If it's a great idea, I might do it for you. If it's a
terrible idea, no patch will change my mind.
The worst ideas are configuration options. You'll need to provide a great
justification in order to persuade me to take on the maintenance and support
burden it will inevitably entail. See if you can get away with a custom map
or autocommand instead.
+81
View File
@@ -0,0 +1,81 @@
VIM LICENSE
I) There are no restrictions on distributing unmodified copies of
pathogen.vim except that they must include this license text. You can
also distribute unmodified parts of pathogen.vim, likewise unrestricted
except that they must include this license text. You are also allowed to
include executables that you made from the unmodified pathogen.vim
sources, plus your own usage examples and Vim scripts.
II) It is allowed to distribute a modified (or extended) version of
pathogen.vim, including executables and/or source code, when the following
four conditions are met:
1) This license text must be included unmodified.
2) The modified pathogen.vim must be distributed in one of the following
five ways:
a) If you make changes to pathogen.vim yourself, you must clearly
describe in the distribution how to contact you. When the
maintainer asks you (in any way) for a copy of the modified
pathogen.vim you distributed, you must make your changes, including
source code, available to the maintainer without fee. The
maintainer reserves the right to include your changes in the
official version of pathogen.vim. What the maintainer will do with
your changes and under what license they will be distributed is
negotiable. If there has been no negotiation then this license, or
a later version, also applies to your changes. The current
maintainer is Bram Moolenaar <Bram@vim.org>. If this changes it
will be announced in appropriate places (most likely vim.sf.net,
www.vim.org and/or comp.editors). When it is completely impossible
to contact the maintainer, the obligation to send him your changes
ceases. Once the maintainer has confirmed that he has received your
changes they will not have to be sent again.
b) If you have received a modified pathogen.vim that was distributed as
mentioned under a) you are allowed to further distribute it
unmodified, as mentioned at I). If you make additional changes the
text under a) applies to those changes.
c) Provide all the changes, including source code, with every copy of
the modified pathogen.vim you distribute. This may be done in the
form of a context diff. You can choose what license to use for new
code you add. The changes and their license must not restrict
others from making their own changes to the official version of
pathogen.vim.
d) When you have a modified pathogen.vim which includes changes as
mentioned under c), you can distribute it without the source code
for the changes if the following three conditions are met:
- The license that applies to the changes permits you to distribute
the changes to the Vim maintainer without fee or restriction, and
permits the Vim maintainer to include the changes in the official
version of pathogen.vim without fee or restriction.
- You keep the changes for at least three years after last
distributing the corresponding modified pathogen.vim. When the
maintainer or someone who you distributed the modified
pathogen.vim to asks you (in any way) for the changes within this
period, you must make them available to him.
- You clearly describe in the distribution how to contact you. This
contact information must remain valid for at least three years
after last distributing the corresponding modified pathogen.vim,
or as long as possible.
e) When the GNU General Public License (GPL) applies to the changes,
you can distribute the modified pathogen.vim under the GNU GPL
version 2 or any later version.
3) A message must be added, at least in the output of the ":version"
command and in the intro screen, such that the user of the modified
pathogen.vim is able to see that it was modified. When distributing as
mentioned under 2)e) adding the message is only required for as far as
this does not conflict with the license used for the changes.
4) The contact information as required under 2)a) and 2)d) must not be
removed or changed, except that the person himself can make
corrections.
III) If you distribute a modified version of pathogen.vim, you are encouraged
to use the Vim license for your changes and make them available to the
maintainer, including the source code. The preferred way to do this is
by e-mail or by uploading the files to a server and e-mailing the URL. If
the number of changes is small (e.g., a modified Makefile) e-mailing a
context diff will do. The e-mail address to be used is
<maintainer@vim.org>
IV) It is not allowed to remove this license from the distribution of the
pathogen.vim sources, parts of it or from a modified version. You may
use this license for previous pathogen.vim releases instead of the
license that they came with, at your option.
+153
View File
@@ -0,0 +1,153 @@
# 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](https://github.com/tpope/vim-sensible) 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][].
[scriptease.vim]: https://github.com/tpope/vim-scriptease
## 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](http://stopwritingramblingcommitmessages.com/),
I'm not going to accept your pull request. I've explained very politely
dozens of times that
[my general guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
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](https://github.com/tpope/vim-pathogen) and vote for it on
[vim.org](http://www.vim.org/scripts/script.php?script_id=2332). And if
you're feeling especially charitable, follow [tpope](http://tpo.pe/) on
[Twitter](http://twitter.com/tpope) and
[GitHub](https://github.com/tpope).
## License
Copyright (c) Tim Pope. Distributed under the same terms as Vim itself.
See `:help license`.
+214 -50
View File
@@ -1,36 +1,77 @@
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope
" Last Change: Oct 24, 2008
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.4
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" API is documented below.
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your
" .vimrc is the only other setup necessary.
"
" The API is documented inline below.
if exists("g:loaded_pathogen") || &cp
finish
endif
let g:loaded_pathogen = 1
" Point of entry for basic default usage. Give a relative path to invoke
" pathogen#interpose() or an absolute path to invoke pathogen#surround().
" Curly braces are expanded with pathogen#expand(): "bundle/{}" finds all
" subdirectories inside "bundle" inside all directories in the runtime path.
" If no arguments are given, defaults "bundle/{}", and also "pack/{}/start/{}"
" on versions of Vim without native package support.
function! pathogen#infect(...) abort
if a:0
let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")')
else
let paths = ['bundle/{}', 'pack/{}/start/{}']
endif
if has('packages')
call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"')
endif
let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*$'
for path in filter(copy(paths), 'v:val =~# static')
call pathogen#surround(path)
endfor
for path in filter(copy(paths), 'v:val !~# static')
if path =~# '^\%([$~\\/]\|\w:[\\/]\)'
call pathogen#surround(path)
else
call pathogen#interpose(path)
endif
endfor
call pathogen#cycle_filetype()
if pathogen#is_disabled($MYVIMRC)
return 'finish'
endif
return ''
endfunction
" Split a path into a list.
function! pathogen#split(path) abort " {{{1
function! pathogen#split(path) abort
if type(a:path) == type([]) | return a:path | endif
if empty(a:path) | return [] | endif
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
endfunction " }}}1
endfunction
" Convert a list to a path.
function! pathogen#join(...) abort " {{{1
let i = 0
function! pathogen#join(...) abort
if type(a:1) == type(1) && a:1
let i = 1
let space = ' '
else
let i = 0
let space = ''
endif
let path = ""
while i < a:0
if type(a:000[i]) == type([])
let list = a:000[i]
let j = 0
while j < len(list)
let escaped = substitute(list[j],'[\\, ]','\\&','g')
if exists("+shellslash") && !&shellslash
let escaped = substitute(escaped,'^\(\w:\\\)\\','\1','')
endif
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
let path .= ',' . escaped
let j += 1
endwhile
@@ -40,61 +81,184 @@ function! pathogen#join(...) abort " {{{1
let i += 1
endwhile
return substitute(path,'^,','','')
endfunction " }}}1
endfunction
" \ on Windows unless shellslash is set, / everywhere else
function! pathogen#separator() abort " {{{1
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction " }}}1
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
function! pathogen#legacyjoin(...) abort
return call('pathogen#join',[1] + a:000)
endfunction
" Convenience wrapper around glob() which returns a list
function! pathogen#glob(pattern) abort " {{{1
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
endfunction "}}}1
" Turn filetype detection off and back on again if it was already enabled.
function! pathogen#cycle_filetype() abort
if exists('g:did_load_filetypes')
filetype off
filetype on
endif
endfunction
" Like pathogen#glob(), only limit the results to directories
function! pathogen#glob_directories(pattern) abort " {{{1
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction "}}}1
" Check if a bundle is disabled. A bundle is considered disabled if its
" basename or full name is included in the list g:pathogen_blacklist or the
" comma delimited environment variable $VIMBLACKLIST.
function! pathogen#is_disabled(path) abort
if a:path =~# '\~$'
return 1
endif
let sep = pathogen#slash()
let blacklist = get(g:, 'pathogen_blacklist', get(g:, 'pathogen_disabled', [])) + pathogen#split($VIMBLACKLIST)
if !empty(blacklist)
call map(blacklist, 'substitute(v:val, "[\\/]$", "", "")')
endif
return index(blacklist, fnamemodify(a:path, ':t')) != -1 || index(blacklist, a:path) != -1
endfunction
" Prepend all subdirectories of path to the rtp, and append all after
" directories in those subdirectories.
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
let sep = pathogen#separator()
let before = pathogen#glob_directories(a:path.sep."*[^~]")
let after = pathogen#glob_directories(a:path.sep."*[^~]".sep."after")
" Prepend the given directory to the runtime path and append its corresponding
" after directory. Curly braces are expanded with pathogen#expand().
function! pathogen#surround(path) abort
let sep = pathogen#slash()
let rtp = pathogen#split(&rtp)
let path = expand(a:path)
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
let &rtp = pathogen#join(before + rtp + after)
let path = fnamemodify(a:path, ':s?[\\/]\=$??')
let before = filter(pathogen#expand(path), '!pathogen#is_disabled(v:val)')
let after = filter(reverse(pathogen#expand(path, sep.'after')), '!pathogen#is_disabled(v:val[0 : -7])')
call filter(rtp, 'index(before + after, v:val) == -1')
let &rtp = pathogen#join(before, rtp, after)
return &rtp
endfunction " }}}1
endfunction
" For each directory in rtp, check for a subdirectory named dir. If it
" exists, add all subdirectories of that subdirectory to the rtp, immediately
" after the original directory. If no argument is given, 'bundle' is used.
" Repeated calls with the same arguments are ignored.
function! pathogen#runtime_append_all_bundles(...) " {{{1
let sep = pathogen#separator()
let name = a:0 ? a:1 : 'bundle'
if "\n".s:done_bundles =~# "\\M\n".name."\n"
" For each directory in the runtime path, add a second entry with the given
" argument appended. Curly braces are expanded with pathogen#expand().
function! pathogen#interpose(name) abort
let sep = pathogen#slash()
let name = a:name
if has_key(s:done_bundles, name)
return ""
endif
let s:done_bundles .= name . "\n"
let s:done_bundles[name] = 1
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
let list += pathogen#glob_directories(substitute(dir,'after$',name.sep.'*[^~]'.sep.'after','')) + [dir]
let list += reverse(filter(pathogen#expand(dir[0 : -6].name, sep.'after'), '!pathogen#is_disabled(v:val[0 : -7])')) + [dir]
else
let list += [dir] + pathogen#glob_directories(dir.sep.name.sep.'*[^~]')
let list += [dir] + filter(pathogen#expand(dir.sep.name), '!pathogen#is_disabled(v:val)')
endif
endfor
let &rtp = pathogen#join(list)
let &rtp = pathogen#join(pathogen#uniq(list))
return 1
endfunction
let s:done_bundles = ''
" }}}1
let s:done_bundles = {}
" vim:set ft=vim ts=8 sw=2 sts=2:
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() abort
let sep = pathogen#slash()
for glob in pathogen#split(&rtp)
for dir in map(split(glob(glob), "\n"), 'v:val.sep."/doc/".sep')
if (dir)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir) == 2 && !empty(split(glob(dir.'*.txt'))) && (!filereadable(dir.'tags') || filewritable(dir.'tags'))
silent! execute 'helptags' pathogen#fnameescape(dir)
endif
endfor
endfor
endfunction
command! -bar Helptags :call pathogen#helptags()
" Execute the given command. This is basically a backdoor for --remote-expr.
function! pathogen#execute(...) abort
for command in a:000
execute command
endfor
return ''
endfunction
" Section: Unofficial
function! pathogen#is_absolute(path) abort
return a:path =~# (has('win32') ? '^\%([\\/]\|\w:\)[\\/]\|^[~$]' : '^[/~$]')
endfunction
" Given a string, returns all possible permutations of comma delimited braced
" alternatives of that string. pathogen#expand('/{a,b}/{c,d}') yields
" ['/a/c', '/a/d', '/b/c', '/b/d']. Empty braces are treated as a wildcard
" and globbed. Actual globs are preserved.
function! pathogen#expand(pattern, ...) abort
let after = a:0 ? a:1 : ''
let pattern = substitute(a:pattern, '^[~$][^\/]*', '\=expand(submatch(0))', '')
if pattern =~# '{[^{}]\+}'
let [pre, pat, post] = split(substitute(pattern, '\(.\{-\}\){\([^{}]\+\)}\(.*\)', "\\1\001\\2\001\\3", ''), "\001", 1)
let found = map(split(pat, ',', 1), 'pre.v:val.post')
let results = []
for pattern in found
call extend(results, pathogen#expand(pattern))
endfor
elseif pattern =~# '{}'
let pat = matchstr(pattern, '^.*{}[^*]*\%($\|[\\/]\)')
let post = pattern[strlen(pat) : -1]
let results = map(split(glob(substitute(pat, '{}', '*', 'g')), "\n"), 'v:val.post')
else
let results = [pattern]
endif
let vf = pathogen#slash() . 'vimfiles'
call map(results, 'v:val =~# "\\*" ? v:val.after : isdirectory(v:val.vf.after) ? v:val.vf.after : isdirectory(v:val.after) ? v:val.after : ""')
return filter(results, '!empty(v:val)')
endfunction
" \ on Windows unless shellslash is set, / everywhere else.
function! pathogen#slash() abort
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction
function! pathogen#separator() abort
return pathogen#slash()
endfunction
" Convenience wrapper around glob() which returns a list.
function! pathogen#glob(pattern) abort
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#slash()."/]$","","")')
endfunction
" Like pathogen#glob(), only limit the results to directories.
function! pathogen#glob_directories(pattern) abort
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction
" Remove duplicates from a list.
function! pathogen#uniq(list) abort
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction
" Backport of fnameescape().
function! pathogen#fnameescape(string) abort
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction
" Like findfile(), but hardcoded to use the runtimepath.
function! pathogen#runtime_findfile(file,count) abort
let rtp = pathogen#join(1,pathogen#split(&rtp))
let file = findfile(a:file,rtp,a:count)
if file ==# ''
return ''
else
return fnamemodify(file,':p')
endif
endfunction
" vim:set et sw=2: