How to distinguish between <expr> and non-<expr> mappings?
I want to add a possibility of restoring mappings overwritten by my plugin. But the problem is that I cann开发者_开发问答ot 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
.
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.
精彩评论