1

Vim 8 user here. I also use auto pairs and one of the features, called fast wrap or something like that makes use of the metae shortcut. However, if I type alte inside vim nothing happens except that if I press it three times a Swedish a appears on the screen. Any ideas? Thanks

  • Type :imap ALT+E. does it type å? press Enter. what does it say? – Mass Oct 21 '17 at 20:43
  • It does type å after I hit enter – Karl Oct 22 '17 at 2:38
  • If I type it several times at some point it also says @<C-R>=AutoPairsFastWrap()<CR> – Karl Oct 22 '17 at 2:46
  • 1
    alt-mappings are not really portable and depend on the plattform and terminal/gui to work reliably. Therefore, I would suggest, use a different mapping and also create an issue with that specific plugin. – Christian Brabandt Oct 22 '17 at 9:30
  • Unfurtanatly rebind is only solution e.g. let g:AutoPairsShortcutFastWrap='<another key>' – Alex Kroll May 22 '18 at 15:47
1

I just answered yesterday a question from an AutoPair user about displaying all meta-key equivalents for regular characters. That user was fortunate enough to be on a system where Alt + key consistently emits actual characters. In the course of answering I found that I could also use meta-keys in gVim on Windows but get strange results otherwise from Cygwin terminal Vim and when I use Vim after I SSH into Centos or Ubuntu machines.

So to reiterate what Christian said in his comment your best bet if you don't fall into the lucky group is to change the mappings to use key combinations that actually work for you.

TL;DR A portable solution would require using something other than "Alt" mappings.

  • In short, Alt remaps sometimes don't work, and the best solution is to change them – D. Ben Knoble Dec 18 '18 at 0:45
  • Well, they work consistently on my Windows systems. I could, for instance, safely use Alt mappings in my .gvimrc if I were so inclined. One short summation I would fully endorse is "...the only portable solution is to change them." :) – B Layer Dec 18 '18 at 4:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.