tags:

views:

24

answers:

1

I want to add a possibility of restoring mappings overwritten by my plugin. But the problem is that I cannot distinguish between the following mappings:

inoremap <expr> @ test

and

inoremap @ test

First mapping inserts the contents of the variable test, while second inserts text «test». Both mappings give maparg("@", 'i')=="test" and identical output of inoremap i.

+1  A: 

Currently, there isn't a way to do so. There was a discussion about exactly this topic a few months ago and a proof of concept patch was suggested, but there was no response from Bram. Although, it appears he did take notice as the topic is listed in Vim's todo list.

jamessan