1

I am using VIM on Ubuntu 18.04 with the EurKEY keyboard layout. I find the layout useful since it allows me to type German letters like "öüä" easily while still using a more or less standard US layout.

On the layout 'AltGr'+'r' is mapped to the symbol 'ý'. The problem is when I am in INSERT mode and I type 'AltGr'+'r' the symbol 'ý' is not inserted, instead the symbol under the courser is moved to some totally different location. The location is deterministic in the sense that the symbol is always moved to the same location.

Any idea why that is the case? Actually I do not need the symbol 'ý' at all (I just happen to press the combination very often ...) so disabling it all together would be an option for me. Nevertheless I would also like to understand what is causing the error?

If you need any more information about setup please let me know.

1 Answer 1

1

This is probably due to the way Alt combinations are send: usually it’s <Esc>{some other characters} (you can find out which via <C-v> I believe).

You can see why in Insert mode this can cause edits—vim sees and Escape and then some (usually deterministic) normal mode commands.

As for a solution, I’d suggest looking at other questions on vi.stackexchange regarding Alt mappings (IIRC correctly, there are some good ones—anyone who finds them should please edit them in).

In the meantime, take a look at the :h digraphs feature. It’s a useful way to type special characters. I’ve even created a function to make using them easier which I’ve mapped to <C-d> in insert mode. Then certain digraphs are enabled without pressing <C-k>; they are disabled once you leave insert mode.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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