On 2013-05-27, Marc Weber wrote:
> Excerpts from Gary Johnson's message of Mon May 27 21:47:26 +0200 2013:
> > Would you please explain this problem more fully?  I don't observe
> > it.  Vim always loads the plugins in my ~/.vim/after directories.
> 
> vam, vundle, pathogen (and others) do no longer store plugins in ~/.vim
> because its hard to
> - select a subset of plugins to load conditionally
> - its hard to remove plugins (you have to keep track of files belonging
>   to plugins)
> 
> The solution:
> 
>   set rtp+=~/your-one-plugin-dir-1
> 
> Then a lot of standard files don't work
> 
> 
> ==========================================
> test case (run in your shell, eventually )
> 
> ##### backup:
> mkdir vim-your-setup
> mv .vim vim-your-setup
> mv .vimrc vim-your-setup
> 
> 
> #### prepare test case
> # now create files
> cat >> ~/.vimrc <<EOF
> set nocompatible
> set hidden
> filetype indent plugin on | syn on
> set rtp+=~/A"
> 
> EOF
> 
> 
> write_files(){
>   local T="$1"
>   local ID="$2"
> 
>   mkdir -p $T/after/{ftplugin,plugin} $T/ftdetect
>   echo "echoe 'ftplugin html $ID'" > $T/after/ftplugin/html.vim
>   echo "echoe 'plugin $ID'" > $T/after/plugin/html.vim
>   echo "echoe 'ftdetect $ID'" > $T/ftdetect/test.vim
> }
> 
> write_files $HOME/A "test-plugin"
> write_files $HOME/.vim "standard"
> 
> 
> 
> #### run case
> vim
> then :e test.html
> then :messages
> 
> output:
> 
> Error detected while processing /home/marc/.vim/ftdetect/test.vim:
> line    1:
> ftdetect standard
> Error detected while processing /home/marc/.vim/after/plugin/html.vim:
> line    1:
> plugin standard
> "test.html" 7L, 40C
> Error detected while processing /home/marc/.vim/after/ftplugin/html.vim:
> line    1:
> ftplugin html standard  

That was very thorough.  Thank you.  I did that and saw exactly the
output that you posted.

> You'll notice that the ftdetect files and the after files from the
> plugin were not sourced.
> Otherwise you'd find messages with the id "test-plugin" in addition to
> "standard".

But I see them in the output of :scriptnames:

  1: ~/.vimrc
  2: /usr/local/share/vim/vim73/filetype.vim
  3: ~/.vim/ftdetect/test.vim
  4: /usr/local/share/vim/vim73/ftplugin.vim
  5: /usr/local/share/vim/vim73/indent.vim
  6: /usr/local/share/vim/vim73/syntax/syntax.vim
  7: /usr/local/share/vim/vim73/syntax/synload.vim
  8: /usr/local/share/vim/vim73/syntax/syncolor.vim
  9: /usr/local/share/vim/vim73/plugin/getscriptPlugin.vim
 10: /usr/local/share/vim/vim73/plugin/gzip.vim
 11: /usr/local/share/vim/vim73/plugin/matchparen.vim
 12: /usr/local/share/vim/vim73/plugin/netrwPlugin.vim
 13: /usr/local/share/vim/vim73/plugin/rrhelper.vim
 14: /usr/local/share/vim/vim73/plugin/spellfile.vim
 15: /usr/local/share/vim/vim73/plugin/tarPlugin.vim
 16: /usr/local/share/vim/vim73/plugin/tohtml.vim
 17: /usr/local/share/vim/vim73/plugin/vimballPlugin.vim
 18: /usr/local/share/vim/vim73/plugin/zipPlugin.vim
 19: ~/.vim/after/plugin/html.vim
 20: /usr/local/share/vim/vim73/ftplugin/html.vim
 21: ~/.vim/after/ftplugin/html.vim
 22: /usr/local/share/vim/vim73/indent/html.vim
 23: /usr/local/share/vim/vim73/syntax/html.vim
 24: /usr/local/share/vim/vim73/syntax/javascript.vim
 25: /usr/local/share/vim/vim73/syntax/vb.vim
 26: /usr/local/share/vim/vim73/syntax/css.vim

> VAM works around this by sourcing those on
> behalf of the user (except the after/ftplugin case, nobody reported this
> to be an issue yet)

I also adjust 'rtp' in my ~/.vimrc to put the files of certain
plugin packages in their own directories, but only those that exceed
a certain complexity.  I put my own plugins in a ~/.vim/before
directory structured the same as ~/.vim/after.  Everything else goes
into the standard ~/.vim hierarchy.  I've had no problems so far.

I have to run off and don't have time to understand the errors at
the moment, but I will look at them more this evening.

Regards,
Gary

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui