[patch] runtime path doc patch

42 views
Skip to first unread message

Christian Brabandt

unread,
Apr 18, 2018, 7:48:22 AM4/18/18
to vim...@vim.org
Bram,
can you please include the following change in the next runtime update?

I have had now already twice the case¹ that a user of vim-airline has
been using the plugin directory for cloning packages. That made the
plugin break miserably. So put a note into the standard documentation
that this is a bad idea.

¹ see:
https://github.com/vim-airline/vim-airline/issues/1712
https://github.com/vim-airline/vim-airline/issues/1440


diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index d5acf667a..d4b9fa488 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -6489,6 +6489,10 @@ A jump table for the options with a short description can be found at |Q_op|.

And any other file searched for with the |:runtime| command.

+ Note: Do NOT use the plugin/ directory for cloning Vim plugins into it
+ using e.g. Vundle or Plug or manually git cloning into it. This will most
+ likely break the plugin. Use the pack/ (see |packages|) directory for that.
+
The defaults for most systems are setup to search five locations:
1. In your home directory, for your personal preferences.
2. In a system-wide Vim directory, for preferences from the system

Best,
Christian
--
Die Menschen achten den, der sie verachtet.
-- Honoré de Balzac

Bram Moolenaar

unread,
Apr 18, 2018, 2:28:31 PM4/18/18
to vim...@googlegroups.com, Christian Brabandt, vim...@vim.org

Christian wrote:

> can you please include the following change in the next runtime update?
>
> I have had now already twice the case¹ that a user of vim-airline has
> been using the plugin directory for cloning packages. That made the
> plugin break miserably. So put a note into the standard documentation
> that this is a bad idea.
>
> ¹ see:
> https://github.com/vim-airline/vim-airline/issues/1712
> https://github.com/vim-airline/vim-airline/issues/1440

Hmm, I don't think users will be looking in options.txt for this. Best
I can think of is at ":help plugin-details". How about this:


Note that when using a plugin manager or |packages| many directories will be
added to 'runtimepath'. These plugins earch require their own directory,
don't put them directly in ~/.vim/plugin.


But it's really part of the plugin manager to have instructions on how
to install a plugin.

--
hundred-and-one symptoms of being an internet addict:
216. Your pet rock leaves home.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Christian Brabandt

unread,
Apr 18, 2018, 3:01:20 PM4/18/18
to vim...@googlegroups.com, vim...@vim.org

On Mi, 18 Apr 2018, Bram Moolenaar wrote:

>
> Christian wrote:
>
> > can you please include the following change in the next runtime update?
> >
> > I have had now already twice the case¹ that a user of vim-airline has
> > been using the plugin directory for cloning packages. That made the
> > plugin break miserably. So put a note into the standard documentation
> > that this is a bad idea.
> >
> > ¹ see:
> > https://github.com/vim-airline/vim-airline/issues/1712
> > https://github.com/vim-airline/vim-airline/issues/1440
>
> Hmm, I don't think users will be looking in options.txt for this. Best
> I can think of is at ":help plugin-details". How about this:
>
>
> Note that when using a plugin manager or |packages| many directories will be
> added to 'runtimepath'. These plugins earch require their own directory,
> don't put them directly in ~/.vim/plugin.

Okay, that is probably good enough.

>
>
> But it's really part of the plugin manager to have instructions on how
> to install a plugin.

Okay, Vim Plug has been fixed
https://github.com/junegunn/vim-plug/commit/449b4f1ed6084f81a1d0c2c1136cd242ec938625

I created a separate issue for Vundle. Hopefully they fix at too (or at
least mention that this is discouraged).

Best,
Christian
--
Nichts schrecklicher kann den Menschen geschehn
Als das absurde verkörpert zu sehn.
-- Johann Wolfgang von Goethe (Zahme Xenien)

Christian Brabandt

unread,
Apr 19, 2018, 4:06:02 AM4/19/18
to vim...@vim.org

On Mi, 18 Apr 2018, Christian Brabandt wrote:

> Bram,
> can you please include the following change in the next runtime update?

Here is another small doc patch. This might explain the following behaviour:

./vim --clean '-c :e foobar' -c ':au WinEnter <buffer> echom "Entering Window for buffer ". expand("<amatch>")'

Then do `:tabedit ~/.vim/vimrc` and you'll notice a new message
,----
| Entering Window for buffer /home/chrisbra/code/vim-src/src/foobar
`----

diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 25c5e0f96..0c72fe451 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1074,9 +1074,10 @@ WinEnter After entering another window. Not done for
If the window is for another buffer, Vim
executes the BufEnter autocommands after the
WinEnter autocommands.
- Note: When using ":split fname" the WinEnter
- event is triggered after the split but before
- the file "fname" is loaded.
+ Note: For split and tabpage commands the
+ WinEnter event is triggered after the split
+ or tab command but before the file "fname" is
+ loaded.
*WinLeave*
WinLeave Before leaving a window. If the window to be
entered next is for a different buffer, Vim



Mit freundlichen Grüßen
Christian
--
Die größte Ersparnis, die sich im Bereich des Denkens erzielen läßt,
besteht darin, die Nicht-Verstehbarkeit der Welt hinzunehmen - und
sich um den Menschen zu kümmern.
-- Albert Camus

Bram Moolenaar

unread,
Apr 19, 2018, 3:15:52 PM4/19/18
to vim...@googlegroups.com, Christian Brabandt, vim...@vim.org

Christian wrote:

> > Bram,
> > can you please include the following change in the next runtime update?
>
> Here is another small doc patch. This might explain the following behaviour:
>
> ./vim --clean '-c :e foobar' -c ':au WinEnter <buffer> echom "Entering Window for buffer ". expand("<amatch>")'
>
> Then do `:tabedit ~/.vim/vimrc` and you'll notice a new message
> ,----
> | Entering Window for buffer /home/chrisbra/code/vim-src/src/foobar
> `----

Thanks!

--
A computer without Windows is like a fish without a bicycle.
Reply all
Reply to author
Forward
0 new messages