I'd like to set up a "temporary" remap in a plugin on the working buffer, i.e.:
* assign a mapping
* then immediately remap to the prior mapping (stored prior via a call to mapcheck() ).
The mapping would fire, then re-assign itself to the prior mapping.
This ends up being tricky, as the syntax of a remap makes it hard to add a remap. As an example, presumably I have to use execute in the remap (to get the variable which holds the prior variable) but it's not at all clear to me how I'm supposed to escape everything to get it to work.
The best approach I can find is to map to a function call. Has anyone else done this? Any suggestions about the best approach?
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment