Friday, June 15, 2012

Re: Determining which plugin is catching a command?

On Friday, June 15, 2012 4:15:04 AM UTC-5, steen wrote:
> Hi folks,
> I have a deceptively simple and overly broad question. Is there any
> reasonably way within vim to determine what plugin is attempting to
> respond to a given command? The use case I have here is that I have
> installed Tim Pope's excellent surround plugin, which I haven't used
> for a while, and apparently something I have installed in the interim
> is catching the keys that are bound to surround. In other words,
> surround used to work, it doesn't anymore, and I am sure it is the
> fault of one of the far too many plugins I have installed since. Is
> there an easy way to, say, gather some sort of debug data about which
> plugin is catching what keystrokes?
>
> Thanks in advance,
> -- Steen

For discussion, we'll assume the ys mapping of surround.vim isn't working.

To see what it is mapped to, and who mapped it, simply ask Vim with:

:verbose map ys

This will tell you what the mapping invokes, and also which file set up the mapping. From there it should be trivial to figure out which plugin it belongs to.

If it is an insert-mode mapping (for example, the CTRL+S mapping of surround.vim), use:

:verbose map! <C-S>

See:

http://vim.wikia.com/wiki/Troubleshooting
http://vim.wikia.com/wiki/Debug_unexpected_option_settings

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment