2

For some reason, I cannot type right curly braces (}) in VIM. On my German keyboard, the shortcuts are <ALT-8> and <ALT-9> for left and right braces, respectively. These work in all applications, except for VIM, which does not recognize <ALT-9>.

I use VIM 8 in iTerm2 on macOS 13.3. There are no plugins installed in VIM. None of the different :*map commands lists anything related to <ALT-9>.

How do I get my right curly brace back into VIM?

  • Can you type German specific keys in iTerm2 itself on the command line, outside of vim, e.g. äöüß? What about both curly brackets? How about in vim? Do they all work (apart from alt-9)? (I've got a Mac with macOS 13.4, iTerm2 and Vim 8 - and a German keyboard, and Alt-9 works fine in vim to type "}", as do all other keys.) – arcdale Jul 5 '18 at 9:02
0

While checking the questions from @arcdale's comment, I found that <ALT-9> does not produce a } on the commandline, too. The cause of this was simply that I had mapped the navigation shortcut to switch panes in iTerm to <ALT-Number>. Hence, binding switching panes to another combo solved the problem.

Howvever, this does not explain why there was a problem with <ALT-9>, while all the other combinations, <ALT-5> to <ALT-8>, worked as expected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .