On 12/12/09 19:29, JD wrote:
So...I removed the $VIMRUNTIME/ftplugin/ruby.vim and perl.vim which
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?

Thanks


First, sorry for lagging out again.

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):

        if has('autocmd')
                au FileType perl,ruby let b:did_ftplugin = 1
        endif

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.


Best regards,
Tony.
--
Since we have to speak well of the dead, let's knock them while they're
alive.
                -- John Sloan
-- 
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui