如何在 OS X 上不使用特殊字符来代替 VIM 的元组合键

2024-01-30

On OS X, at any program, when I type option-p I get π, option-P I get and there's a bunch of alt/option bindings that just return greek and other special characters.

有没有办法禁用它?

目前我正在使用自动配对 VIM 插件 http://www.vim.org/scripts/script.php?script_id=3599它具有以下默认映射:

<M-p> : Toggle Autopairs (g:AutoPairsShortcutToggle) 
<M-e> : Fast Wrap (g:AutoPairsShortcutFastWrap) 
<M-n> : Jump to next closed pair (g:AutoPairsShortcutJump) 
<M-b> : BackInsert (g:AutoPairsShortcutBackInsert)

当这个特殊输入打开时,我似乎无法使用这些和其他基于元键的 VIM 映射。

EDIT

From 这篇 CNET 文章 http://reviews.cnet.com/8301-13727_7-20097505-263/options-for-character-input-in-os-x-lion/,事实上我需要知道如何禁用页面底部显示的特殊输入。


Use the macmeta环境::set macmeta

From :help 'macmeta'

'macmeta' 使用选项 (alt) 作为元键。启用后,不会解释按下选项键,从而启用绑定<M-..>。关闭时,按选项键将由所选输入法解释并插入为文本。

显然,这是仅限 MacVim 的设置。

In Terminal.app Settings there's a setting for "Use option as meta key", under the Keyboard tab which disables e.g. Option-p printing π. You may need to start a new terminal window to see the effect. But for some reason even after disabling this I'm having trouble setting mappings for <M-p>, but mappings using Ctrl-v and inserting the character literally do work.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 OS X 上不使用特殊字符来代替 VIM 的元组合键 的相关文章

随机推荐