Vim: How to install plugin for a particular filetype?

Posted by ronnie on Super User See other posts from Super User or by ronnie
Published on 2012-10-18T06:54:22Z Indexed on 2012/10/21 11:05 UTC
Read the original article Hit count: 272

Filed under:

Yesterday I came across jedi-vim plugin which provides auto-completion for python. I installed the plugin using pathogen by placing it in bundle directory and it is working fine.

Now, as I have mentioned that this plugin is only for filetype: python so I want to load it only when I open files with .py extensions and not when I open other files like .java, .perl, .sh.

So, how can this be achieved.

I am a vim beginner/noob but I googled before asking and found that this can be achieved using vim ftplugin but I have no idea whatsoever where to place which file.

© Super User or respective owner

Related posts about vim