开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜