plugin loading ordering
According to my reading of :help load-plugins the plugins should be loaded following the runtimepath ordering. That is: first load all the plugins in the first component of runtimepath, then all the plugins in the second component and so on. According to my experiments however this is not the case. It looks like all the plugins from all the components of the runtimepath are loaded in alphabetic order. For example, I have the following runtimepath: runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim70,/usr/share/vim/vimfiles/after,/usr/share/vim/addons/after,/var/lib/vim/addons/after,~/.vim/after with matchit.vim installed (i.e. symlinked) under /usr/share/vim/addons/plugin/. If I add the following plugin to my ~/.vim: $ cat .vim/plugin/no-matchit.vim let loaded_matchit = 1 matchit is still loaded and works properly (note that no-matchit matchit in alphabetic order). However if I move it as follows: $ mv .vim/plugin/no-matchit.vim .vim/plugin/lo-matchit.vim matchit is prevented to be loaded. Is this a bug or a underspecification in the vim docs? Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time
Re: plugin loading ordering
Stefano Zacchiroli wrote: According to my reading of :help load-plugins the plugins should be loaded following the runtimepath ordering. That is: first load all the plugins in the first component of runtimepath, then all the plugins in the second component and so on. According to my experiments however this is not the case. It looks like all the plugins from all the components of the runtimepath are loaded in alphabetic order. For example, I have the following runtimepath: runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim70,/usr/share/vim/vimfiles/after,/usr/share/vim/addons/after,/var/lib/vim/addons/after,~/.vim/after with matchit.vim installed (i.e. symlinked) under /usr/share/vim/addons/plugin/. If I add the following plugin to my ~/.vim: $ cat .vim/plugin/no-matchit.vim let loaded_matchit = 1 matchit is still loaded and works properly (note that no-matchit matchit in alphabetic order). However if I move it as follows: $ mv .vim/plugin/no-matchit.vim .vim/plugin/lo-matchit.vim matchit is prevented to be loaded. Is this a bug or a underspecification in the vim docs? Cheers. According to your settings, the plugins ought to be loaded in the following sequence (which seems unduly complicated to me but that's not my business): 1. everything in ~/.vim/plugin/*.vim 2. everything in /var/lib/vim/addons/plugin/*.vim 3. everything in /usr/share/vim/addons/plugin/*.vim 4. everything in /usr/share/vim/vimfiles/plugin/*.vim 5. everything in /usr/share/vim/vim70/plugin/*.vim 6. everything in /usr/share/vim/vimfiles/after/plugin/*.vim 7. everything in /usr/share/vim/addons/after/plugin/*.vim 8. everything in /var/lib/vim/addons/after/plugin/*.vim 9. everything in ~/.vim/after/plugin/*.vim That's what :scriptnames should show. If a plugin has a :finish clause near the start, it might get loaded and do nothing, but still appear in the :scriptnames listing. What you describe lets me believe that there's something in your ~/.vim/plugin (maybe ~/.vim/plugin/matchit.vim ?) which invokes (or is) some version of matchit. Best regards, Tony.
Re: plugin loading ordering
On Wed, Jan 24, 2007 at 09:48:03AM +0100, A.J.Mechelynck wrote: That's what :scriptnames should show. If a plugin has a :finish clause near the start, it might get loaded and do nothing, but still appear in the :scriptnames listing. Thanks, I was not aware of the :scriptnames command. What you describe lets me believe that there's something in your ~/.vim/plugin (maybe ~/.vim/plugin/matchit.vim ?) which invokes (or is) some version of matchit. Gotcha, I had indeed a symlinked matchit.vim from my ~/.vim/. Sorry for the noise. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy [EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/ (15:56:48) Zack: e la demo dema ?/\All one has to do is hit the (15:57:15) Bac: no, la demo scema\/right keys at the right time