19

I was about to answer a question but realized that my answer depends on a key binding provided by a plugin I have installed. Even worse, I don't know which plugin provides it.

The only way I know to solve this problem would be to "binary search" my installed plugins by disabling half and enabling the other half. I use Vundle to manage my plugins so each iteration would only require me to comment out part of a plugin list but that's still a clumsy procedure.

Is there a better way to determine which plugin is responsible for a given key binding? Is there a way to determine if a given key binding is instead provided by my vimrc file directly?

I realize Vim doesn't have a builtin notion of plugins, so maybe the question is more precisely phrased as "How can I determine which file containing vimscript is responsible for a given key binding?".

24

You can use the following: :verbose map <c-p> replacing <c-p> with the key bind you're looking for. Prints something like this:

Last set from ~/.vim/bundle/ctrlp.vim/plugin/ctrlp.vim

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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