Add support vim's langnoremap new option

This fixes the following issue:
https://github.com/SirVer/ultisnips/issues/431
This commit is contained in:
Dettorer 2015-02-12 14:45:00 +01:00
parent 8367587e4d
commit c1bde18cdf

View File

@ -281,7 +281,8 @@ class _RealLangMapTranslator(object):
class _DummyLangMapTranslator(object): class _DummyLangMapTranslator(object):
"""If vim hasn't got the langmap compiled in, we never have to do anything. """If vim hasn't got the langmap compiled in, or is using langnoremap, we
never have to do anything.
Then this class is used. Then this class is used.
@ -291,3 +292,5 @@ class _DummyLangMapTranslator(object):
_LangMapTranslator = _RealLangMapTranslator _LangMapTranslator = _RealLangMapTranslator
if not int(eval('has("langmap")')): if not int(eval('has("langmap")')):
_LangMapTranslator = _DummyLangMapTranslator _LangMapTranslator = _DummyLangMapTranslator
elif int(eval('exists("+langnoremap") && &langnoremap')):
_LangMapTranslator = _DummyLangMapTranslator