On 06/05/09 05:30, Ben Fritz wrote:
>
>
>
> On May 4, 12:10 pm, Matt Wozniski<[email protected]> wrote:
>
>>
>> But this isn't. This would be true for ftplugins or syntax files, but
>> not for plugins. The file can have any name at all, it will be
>> executed no matter what.
>
> Oh, wow...stupid mistake on my part. I guess I just assumed it would
> be that way because ftplugins and syntax files are that way. But it
> would be implemented with a :runtime command or the equivalent.
>
> So...just so I'm sure I know what I'm talking about from here on out,
> the only real difference between ~/.vim/plugin and ~/.vim/after/plugin
> is that the after directory comes later in the runtimepath, and
> therefore its contents will get sourced last (even after $VIM/vimfiles/
> after/plugin)?
Exactly. At some point near the end of startup, and unless started with
-u NONE or with --noplugin, Vim does in C code the equivalent of
:runtime! plugin/*.vim
On Unix, this will source the following scripts in the following order
(assuming the default value for 'runtimepath'):
- all Vim scripts (if any) in ~/.vim/plugin/
- all Vim scripts (if any) in $VIM/vimfiles/plugin/
- all Vim scripts in $VIMRUNTIME/plugin/
- all Vim scripts (if any) in $VIM/vimfiles/after/plugin/
- all Vim scripts (if any) in ~/.vim/after/plugin/
On Windows, replace ~/.vim/ by ~/vimfiles/.
At the FileType event, only filetype and/or indent scripts for the
current filetype, and at the Syntax event only the syntax scripts for
the current syntax, will be sourced. IIUC, this is the result in actual
runtime! commands set in autocommands by several of the scripts in the
$VIMRUNTIME/ top directory and run as a result of the various variants
of the ":filetype" ex-command.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
28. You have comandeered your teenager's phone line for the net and even his
friends know not to call on his line anymore.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---