From c1bde18cdf6be73517158f27073fb01027946924 Mon Sep 17 00:00:00 2001 From: Dettorer Date: Thu, 12 Feb 2015 14:45:00 +0100 Subject: [PATCH] Add support vim's langnoremap new option This fixes the following issue: https://github.com/SirVer/ultisnips/issues/431 --- pythonx/UltiSnips/_vim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pythonx/UltiSnips/_vim.py b/pythonx/UltiSnips/_vim.py index 15163ea..b9afc38 100644 --- a/pythonx/UltiSnips/_vim.py +++ b/pythonx/UltiSnips/_vim.py @@ -281,7 +281,8 @@ class _RealLangMapTranslator(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. @@ -291,3 +292,5 @@ class _DummyLangMapTranslator(object): _LangMapTranslator = _RealLangMapTranslator if not int(eval('has("langmap")')): _LangMapTranslator = _DummyLangMapTranslator +elif int(eval('exists("+langnoremap") && &langnoremap')): + _LangMapTranslator = _DummyLangMapTranslator