- William Norris wrote:
> it is my understanding that the files in the system ftplugin folder areIt is not quite automatic. It does work this way if you have a line
> automatically sourced by vim based on the filetype. for example, when I
> edit an email in mutt, then vim will source the files
> is that correct?
filetype plugin on
in your vimrc file.
> I read somewhere online (can't find the page now) that this also heldIf you already have the line I mentioned in your vimrc file, it is likely
> true for a local plugin directory `~/.vim/ftplugin/`. However, this
> doesn't seem to be holding true for me. Is there a way to have vim
> automatically source files in this 'local' ftplugin folder? I like the
> idea of keeping them in my home directory so they move with me, but I
> also like the auto-sourcing feature.
that both the default ftplugins (under /usr/local/share/vim/ ) and your personal
ones (under ~/.vim/ ) are being :source'd . Yours come first (assuming the
usual setting of the 'runtimepath' option) so youe settings may get undone by
the default ftplugins. Either put your ftplugins under ~/.vim/after/ftplugin/
or have your ftplugin define the b:did_ftplugin variable so that the defaults
HTH --Benji Fisher