For example, if I execute the following command from the terminal:

vim -c PluginList

this command opens vim and lists my currently installed plugins. How do I execute the above command but redirect the output to my terminal?

  • In my installation of vim, there's no :PluginList command available. Is that command itself part of a plugin?
    – Dalker
    Oct 7, 2016 at 14:39
  • As your listing command writes to a buffer, I think that this question is strongly related if not a duplicate.
    – statox
    Oct 7, 2016 at 14:47

2 Answers 2


Since you appear to be using Vundle, you could simply grep your vimrc:

$ grep -c Plugin ~/.vimrc
  • Should have thought of that before. I use the following command Oct 14, 2016 at 22:08
  • grep -ri "Bundle" ~/.vimrc Oct 14, 2016 at 22:09

EDIT: modified original answer to keep only the finished script version.

For future reference to people browsing this question, here's a solution to the original question that will work even if Vundle is not being used with vim (longer than @romainl's answer that does require Vundle, which seems to be fine for the OP).

The following script assumes a standard unix-like environment with access to common utilities such as sed, sort and mktemp. Just paste into somefile in your $path, then chmod +x somefile and execute somefile on the command line.

vim +"help local-additions" +"sav! $tmp" +"qall"
sed '1,/LOCAL ADDITIONS/d' $tmp | sed '/^$/,$d' | sortj
rm $tmp

Here's an example of output when invoking this script from the command-line:

|bufkill.txt|  Manage buffer display upon removal of current buffer   
|fugitive.txt|  A Git wrapper so awesome, it should be illegal 
|matchit.txt|   Extended "%" matching
|now.txt|           A pure vim minimalistic personal wiki 
|recover.vim|   Show differences for recovered files
|sneak.txt|  motion improved - Version 1.7.2
|snipMate.txt|  Plugin for using TextMate-style snippets in Vim.
|startify.txt|  The fancy start screen.
|surround.txt|  Plugin for deleting, changing, and adding "surroundings"
|undotree.txt|  Display your undo history in a graph
|vimux.txt|   easily interact with tmux

Note that it will miss any plugins that don't have a proper vim help file (in the .doc/ subdirectory of the plugin).

  • I really like that script. I just which there was a simple command line tool to show the Plugins installed at any given time. Oct 14, 2016 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.