René Nyffenegger
René Nyffenegger

Reputation: 40543

Why can I map <M-w> but not <M-r> in gvim?

I successfully defined a mapping to be invoked with ALT+w like so :map <M-w> ....

Yet, if I try to define a new mapping to be invoked with ALT+r like so :map <M-r> ... it doesn't work. Instead, the character ò (if the mapping is invoked in insert mode) is inserted. This is the same character that is inserted without mappings at all (and also with gvim started with gvim -u NONE).

I don't understand why one mapping works and the other doesn't.

Edit to answer some quiestions

I am working on a german Windows 7. The current keyboard layout is English (USA)

When I press Alt+w in insert mode without mapping, I get a ÷.

Upvotes: 3

Views: 153

Answers (1)

mMontu
mMontu

Reputation: 9273

Both mappings works on my machine.

Maybe there is some problem with your mapping command, or it is still being changed by some setting you are using. Despite of using u -NONE you could try some other switches, as -U and -i; more info on this can be found on vim faq 36.12. You could also try with noremap instead of map.

"20.4. I am not able to create a mapping for the key. What is wrong?" has some additional suggestions.

Upvotes: 1

Related Questions