# Unmap accented characters

If I press Alto, it prints ï. I would prefer it not do anything. I tried these:

:unmap <M-o>
:iunmap <M-o>


but it just says:

E31: No such mapping


From the comments, I have also tried these:

gvim -u NONE -N
gvim --clean


and I tried the release without runtime files as well:

https://ftp.nluug.nl/pub/vim/pc/gvim82.zip

also set keymap returns keymap=.

• These are not Vim mappings, but they're defined by your O.S.'s keyboard driver. You can probably check that by using the same combination on another application... You can possibly change your O.S.'s settings (or keyboard layout) so it doesn't produce those characters, but that's out of this scope of Vi & Vim... Try [Superuser SE](superuser.com) perhaps... Feb 16 '20 at 5:37
• How about :iunmap <M-o>, does that do anything? Feb 16 '20 at 5:43
• Vim on terminal or gVim? Are you sure it's not your terminal or something? Vim doesn't do this by default... So unless you have a vimrc from someone else that sets this up (and it doesn't look like you do), not sure how to explain this. Feb 16 '20 at 5:49
• Try gvim -u NONE -N or gvim --clean or similar, as well... Also, I think there might be something on Windows about keyboard layouts per application, so maybe that's why you see this on gVim and not notepad? Feb 16 '20 at 6:00
• Does :set keymap? return anything? If it's set, that might explain it (perhaps...) Feb 16 '20 at 6:13

This is a normal behaviour of gui flavours of vim like gvim. <m-i>, <a-i> and é are the same thing.

Usually people aren't bothered by meta+key inserting an accentuated character, but the other way around. See the very old issue with French people needing to insert é in LaTeX document which in turn triggers \item insertion (IIRC) with vim-latex.

My opinion on the subject: don't bother with it and learn not to type <m-o> needlessly.

PS: while I was looking for the recent discussion I've seen in my mailbox on this topic, I've found the vim issue # 5644 that OP has probably initiated (given the timestamps). Why is this question active today?

This works for upper and lower:

imap <M-O> <Nop>
imap <M-o> <Nop>