Tuesday, May 10, 2011

Re: Standard way to undo plugin mappings?

On May 10, 9:27 am, Nathan Neff <nathan.n...@gmail.com> wrote:
> What's the best way to unmap or turn off these mappings?
>
> I've looked for a switch or options in BufExplorer to turn off these
> mappings, but there is none.
>

This would be the best way, but if it's not available, then...

> I realize that I can comment out the mappings, but that feels hacky,
> and if there's an upgrade, I'll
> have to do it again.
>

This would work, but you're right about the upgrade. You can always
try adding an option and sending a patch with the option to the plugin
maintainer, but a better option would be:

> Is there a "standard" way to undo mappings that are created by
> plugins?  For example, should I
> use an "after" script to undo these mappings?
>

Yes, this would be the standard way. Just add a script to the
appropriate after directory for the plugin type, probably with the
same name (though with after/plugin this won't matter at all). In the
script, unmap anything you want unmapped, and/or map to different keys
if desired.

I've used ~/.vim/after/plugin, ~/.vim/after/ftplugin, ~/.vim/after/
indent, and ~/.vim/after/syntax and they've all worked fine. "colors"
does not seem to work in the after directory. I'm not certain on the
other types (like compiler plugins).

--
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: