O'Reilly logo

Mastering Vim by Ruslan Osipov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Plugin layout

Since the Vim 8 release, there's thankfully only one way of structuring your plugins (which is also compatible with major plugin managers, such as vim-plug, Vundle, or Pathogen). The plugins are expected to have the following directory structure:

  • autoload/ lets you lazy load bits of your plugin (more on that later)
  • colors/ color schemes
  • compiler/ (language-specific) compiler-related functionality
  • doc/ documentation
  • ftdetect/ (filetype-specific) filetype detection settings
  • ftplugin/ (filetype-specific) filetype-related plugin code
  • indent/ (filetype-specific) indentation-related settings
  • plugin/ the core functionality of your plugin
  • syntax/ (language-specific) defines language syntax group

As we develop our plugin, let's use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required