Re: Bug on FreeBSD 5.4
- On 12/12/09 19:29, JD wrote:
> So...I removed the $VIMRUNTIME/ftplugin/ruby.vim and perl.vim whichFirst, sorry for lagging out again.
> seems to work as a temporary stopgap until this issue is really fixed
> (perl and ruby files open fine now). A question though...What
> functionality do I lose by not having these ftplugins?
You lose whatever functionality these scripts provide ;-). I haven't
looked at them in detail, but normally ftplugins set filetype-dependent
options of all kinds, maybe mappings, etc.
Note that removing stuff from subfolders of $VIMRUNTIME is generally not
a good idea, because the next time you upgrade your runtime files, and
in any case no later than when you install the next version of Vim,
whatever you removed will be put back in.
To disable filetype-plugins for files of a certain type, the usual
method is to "pretend" that these ftplugins have already been sourced.
For ruby and perl, you would add the following near the top of your
vimrc (even before filetype plugin on I think):
au FileType perl,ruby let b:did_ftplugin = 1
possibly within a specific "autocommand group" typical for your vimrc.
Then when the ftplugin starts, it will see the b:did_ftplugin variable
and ":finish" without doing anything.
Since we have to speak well of the dead, let's knock them while they're
-- John Sloan