Recommended plugins

Last updated on
26 November 2017

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

The Vimrc Project

This page is part of the documentation for the vimrc project. For other documentation pages, check the links in the sidebar or go to the top documentation page.

Just as Drupal has thousands of modules that extend its features, vim has thousands of plugins (and other types of scripts) that you can install. Here are some that we find useful. The Vimrc project has been tested with all of these, and adds support for some of them.

Starting with the 7.x-1.0-alpha5 release, all the plugins recommended on this page are installed automatically if you use drush vimrc-install. See the Installation page.

Start here

Pathogen:

The ultimate plugin management system. If you aren't using this, your .vim/ folder is probably a mess. We recommend that you use pathogen to install the Vimrc project, and it is helpful to manage other plugins, such as the oned we recommend on this page.
https://github.com/tpope/vim-pathogen

Vundle

Vundle works similarly to Pathogen but can control, update, install new plugins from within vim and does not rely knowledge on how to use git.
https://github.com/gmarik/vundle

Pick and choose

Fugitive

"A Git wrapper so awesome, it should be illegal." Enough said.
https://github.com/tpope/vim-fugitive

NERDCommenter

Comment/uncomment lines with a few key strokes or from a menu.
https://github.com/scrooloose/nerdcommenter

NERDTree

Popular file browser. See the screenshot at the bottom of our main page.
https://github.com/scrooloose/nerdtree

SnipMate

Emulate Textmate's snippet functionality. See #1139024: Add support for Drupal Snippets for Vim for discussion of Drupal snippets. The main repository is
https://github.com/msanders/snipmate.vim
but that has not been updated since April, 2010. Active work has on the plugin here since February 2011: https://github.com/garbas/vim-snipmate

Syntastic

Checks the syntax of files when saving. Saves you from needless parse errors.
https://github.com/scrooloose/syntastic
See #1328552: Add support for Coder code reviews and Syntastic plugin for the status of Syntastic support. This screenshot shows Syntastic in action, with the finicky Drupal CodeSniffer checking for violations of coding standards.
Syntastic with PHP_CodeSniffer and DrupalCS

TagBar

Run (exuberant) ctags on the current file, then generate a jump list of functions etc. defined in the file. This is a rewrite for vim 7.x of the older TagList plugin. See the screenshot at the bottom of our main page.
https://github.com/majutsushi/tagbar
See our installation page for information on Exuberant ctags.

TagList

We recommend that you use the TagBar plugin instead. If you already use TagList and do not want to switch, then apply the patch from #1341778-7: drupal vim seems to break taglist plugin. The installation script will install TagBar instead of TagList.

Twig

The vim-twig plugin adds syntax coloring, snippets, and some filetype settings for editing Twig files, which will be the standard template type in D8, replacing .tpl.php.

Vdebug

The Vdebug plugin provides an interface between Vim and Xdebug (and any other debugger that implements the DBGP protocol). This requires a version of vim compiled with support for Python.

vim-php-namespace

The vim-php-namespace plugin inserts "use" statements automatically (\u in insert mode). Much useful for Drupal 8!

Worth a look

I have not had a chance to evaluate these, but they look promising.

Help improve this page

Page status: No known problems

You can: