From ff183b219aec0f40bdb203d580b545ce4f83b214 Mon Sep 17 00:00:00 2001 From: Carlo Baldassi Date: Mon, 5 Apr 2021 11:15:22 +0200 Subject: [PATCH] L2U less hacky esc_sequence Fix #204, #205 Supersedes #215 --- autoload/LaTeXtoUnicode.vim | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/autoload/LaTeXtoUnicode.vim b/autoload/LaTeXtoUnicode.vim index 8d9f677..472407d 100644 --- a/autoload/LaTeXtoUnicode.vim +++ b/autoload/LaTeXtoUnicode.vim @@ -59,13 +59,9 @@ function! s:L2U_SetupGlobal() let g:latex_to_unicode_suggestions = 0 endif - " A hack to forcibly get out of completion mode: feed - " this string with feedkeys() - if has("win32") || has("win64") - let s:l2u_esc_sequence = "\u0006" - else - let s:l2u_esc_sequence = "\u0091\b" - end + " Forcibly get out of completion mode: feed + " this string with feedkeys(s:l2u_esc_sequence, 'n') + let s:l2u_esc_sequence = " \b" " Trigger for the previous mapping of let s:l2u_fallback_trigger = "\u0091L2UFallbackTab"