Difference between plugin and ftplugin directories in vim

From raju

Q. In my ~/.vim directory, I see plugin and ftplugin directories. For example,

rajulocal@hogwarts:~$ ls -1 ~/.vim | grep plugin

What is the difference between the two?

A. vim supports two types of plugins:

    global plugin: Used for all kinds of files
  filetype plugin: Only used for a specific type of file

On Linux, the ~/.vim/plugin directory contains all the global plugins. The ~/.vim/ftplugin directory contains all the plugins specific to a file type.

System Information:-
vim 7.4.488 on a machine running Debian Jessie


  •  :help plugin