Thursday, April 28, 2011

Re: Plugin for specific file type

On Apr 28, 11:26 am, JuanPabloAJ <jabar...@gmail.com> wrote:
> but, if this plugin is for many language,
> I cant use the &ft variable ?
>

Sure you can, but that's not what you asked. You have a few options:

1. Always load the plugin for all file types by placing it in your
~/.vim/plugin directory, but for every feature in the plugin, make it
do nothing unless &ft is the desired file type.
2. Only load the plugin for certain file types, by using the filetype
plugin method mentioned, and copying it for every desired file type.
3. Only load the plugin for certain file types, by sourcing the script
in a FileType autocmd for the desired file types.
4. Some other method you may be able to think of, Vim has lots of ways
to automatically do arbitrary things, including the sourcing of
scripts.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: