简体   繁体   English

在omap映射中使用alt键

[英]Using alt key in omap mappings

I'm unable to use the Alt key in omap mappings in Linux. 我无法在Linux中的omap映射中使用Alt键。 For eg. 例如。

nmap <A-w> w

works properly and behaves identically to w . 工作正常,行为与w相同。 However, the following doesn't. 但是,以下不是。

omap <A-w> w

doesn't work as expected in Ubuntu but does in Windows. 在Ubuntu中无法正常工作,但在Windows中却无法正常工作。 What am I missing here? 我在这里想念什么?

EDIT: I'm using gvim but my menubar has been disabled so doesn't open the gvim Menu. 编辑:我正在使用gvim,但我的菜单栏已被禁用,因此无法打开gvim菜单。

EDIT: Realized that this was happening because the key is mapped to the key in Ubuntu Unity. 编辑:意识到这是因为密钥已映射到Ubuntu Unity中的密钥而发生。 This was somehow interfering with my Vim setup. 这某种程度上干扰了我的Vim设置。 Once I changed that key, everything is working as expected. 一旦更改了密钥,一切都会按预期进行。

Your omap is ok. 您的omap正常。 Since you mentioned that you work with gvim. 既然您提到过要使用gvim。 I guess when you press <Aw> , it will trigger the menu of gvim. 我猜您按<Aw> ,它将触发gvim的菜单。 If this is your problem, you could: 如果这是您的问题,则可以:

:set wak=no

to solve it. 解决它。

:h 'wak' for detail :h 'wak'了解详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM