You're right. But the problem is still there.

I moved my whole ~/.vim tree and created a new one with just these two files:

~/.vim/ftplugin/html.vim
~/.vim/ftplugin/php.vim

containing one line each:

nn <buffer> <F2> Ahtml<esc>
nn <buffer> <F2> Aphp<esc>

respectively. Now I edit a php file and press F2....

I get "html" :-(


On Wed, May 20, 2009 at 16:51, Ben Fritz <[email protected]> wrote:
>
> On May 20, 2:22 am, Erik Wognsen <[email protected]> wrote:
>> Hi,
>> when I open a php file, both ~/.vim/ftplugin/php.vim and
>> ~/.vim/ftplugin/html.vim are sourced. And in that order, which makes
>> the latter override the former. I have the same problem with C++ and
>> C.
>>
>> I see the stuff in $VIMRUNTIME/ftplugin/ runtimes the others, but can
>> I get it the other way round without tampering with the global files?
>>
>
> What do you mean? php.vim sources html.vim VERY early in the file,
> before it sets any options. html.vim is not sourced after php.vim, it
> is sourced DURING the execution of php.vim. It is php.vim that
> overrides html.vim, not the other way around.
> >
>

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

Reply via email to