How to check if a string has earlier been set using iabbr (full match)

Posted by Sumit on Stack Overflow See other posts from Stack Overflow or by Sumit
Published on 2011-01-03T02:55:21Z Indexed on 2011/01/03 5:54 UTC
Read the original article Hit count: 132

Filed under:
|

I am trying to check if a lhs is already abbreviated in vim. mapcheck, however, seems to have a problem. For example,

iabbr swt switch
echo mapcheck('sw','i',1)

returns "switch" even when "switch" defined for "swt". mapargs seem to return a string even if there is a partial match with the lhs. Is there a way to find if an abbreviation has been defined for the "exact" match, i.e., the above mapcheck returning a "" instead.

© Stack Overflow or respective owner

Related posts about vim

Related posts about vimrc