> Right.  When you open a php file, vim loads all the php.vim files[1]
> in your 'runtimepath', typically (for Unix):
>
>    $HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
>
> So in your case, vim will load, in this order,
>
>    ~/.vim/ftplugin/php.vim
>    $VIMRUNTIME/ftplugin/php.vim
>
> That second file contains this line:
>
>    runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
>
> which will cause vim to load
>
>    ~/.vim/ftplugin/html.vim
>    $VIMRUNTIME/ftplugin/html.vim
>
> thereby leaving <F2> set to add "html".
>
> To do what you want to do, a better place to put your customizations
> is in the ~/.vim/after/ftplugin directory, i.e., in the files
>
>    ~/.vim/after/ftplugin/html.vim
>    ~/.vim/after/ftplugin/php.vim
>
> The loading order for all these plugins would then be:
>
>    ~/.vim/ftplugin/php.vim
>    $VIMRUNTIME/ftplugin/php.vim
>    ~/.vim/ftplugin/html.vim
>    $VIMRUNTIME/ftplugin/html.vim
>    ~/.vim/after/ftplugin/html.vim
>    ~/.vim/after/ftplugin/php.vim

Thanks for the explanation!

It makes me wonder: Does it ever serve a purpose to use
~/.vim/ftplugin/ instead of ~/.vim/after/ftplugin/ ?

> BTW, the convention is this group is to bottom post, not top post.

Sorry, back on track..

/Erik

> Regards,
> Gary
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to