kshenoy
kshenoy

Reputation: 1816

Using alt key in omap mappings

I'm unable to use the Alt key in omap mappings in Linux. For eg.

nmap <A-w> w

works properly and behaves identically to w. However, the following doesn't.

omap <A-w> w

doesn't work as expected in Ubuntu but does in Windows. What am I missing here?

EDIT: I'm using gvim but my menubar has been disabled so doesn't open the gvim Menu.

Upvotes: 1

Views: 168

Answers (2)

kshenoy
kshenoy

Reputation: 1816

EDIT: Realized that this was happening because the key is mapped to the key in Ubuntu Unity. This was somehow interfering with my Vim setup. Once I changed that key, everything is working as expected.

Upvotes: 1

Kent
Kent

Reputation: 195069

Your omap is ok. Since you mentioned that you work with gvim. I guess when you press <A-w>, it will trigger the menu of gvim. If this is your problem, you could:

:set wak=no

to solve it.

:h 'wak' for detail

Upvotes: 0

Related Questions