On 2009-10-26, Charles Campbell wrote:

> Now, about $HOME/.vim/ftplugin/python.vim -- in the typical loading 
> sequence, it will be loaded before the global file(s)  (see  :echo &rtp  
> to get an idea of your loading sequence).  So it *won't* override the 
> global one.  If you want to override global plugins, may I suggest that 
> you put it in   $HOME/.vim/after/ftplugin/python.vim  instead.  It will 
> then be loaded after global plugins and will have a chance to override.

If you put your Python filetype settings in
$HOME/.vim/after/ftplugin/python.vim, they will be applied after the
standard Python filetype settings in $VIMRUNTIME/ftplugin/python.vim,
as Chip said.  However, it is also possible to completely replace the
standard Python filetype settings by putting your settings in
$HOME/.vim/ftplugin/python.vim and including these lines at the top
of your plugin:

    if exists("b:did_ftplugin")
        finish
    endif
    let b:did_ftplugin = 1

Those same commands are in $VIMRUNTIME/ftplugin/python.vim.  Since
your plugin is before the standard one in 'runtimepath', yours will
be sourced first, again as Chip said.  However, with those lines in
your python.vim, the standard python.vim will see that b:did_ftplugin
is set and will exit before making any settings.

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