os x上的自定义emacs键密钥绑定:DefaultKeyBinding.dict无法正常工作 [英] Custom emacs-like key bindings on os x: DefaultKeyBinding.dict not working as expected

查看:180
本文介绍了os x上的自定义emacs键密钥绑定:DefaultKeyBinding.dict无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试添加到OS X 10.7.5中的emacs类键绑定。特别是,在默认的键绑定中,alt-d和alt-b插入特殊字符,而我希望它们删除一个单词并移回一个单词。我创建了一个文件〜\Library\KeyBindings\DefaultKeyBinding.dict 与以下内容:

I'm trying to add to the emacs-like key bindings in OS X 10.7.5. In particular, in the default key bindings, alt-d and alt-b insert special characters, while I would like them to delete a word and move back a word. I've created a file ~\Library\KeyBindings\DefaultKeyBinding.dict with the following content:

{
    "~d" = "deleteWordForward:";
}

(如this问题
并打开一个新的终端窗口(我也尝试重新启动),但现在alt-d组合只是在我的哔哔声,没有别的。任何线索?

(as suggested in the answers to this question) and opened a new terminal window (I tried rebooting, too) but now the alt-d combination just beeps at me, and does nothing else. Any clues?

推荐答案

这应该是在Terminal.app 键盘选中使用选项作为元键框。 [我已经验证了该解决方案与OSX Snow Leopard 10.6.8兼容。]从此获得的解决方案: http: /iancwill.com/blog/?p=116

This should do the trick -- within the Terminal.app Keyboard settings, check the box Use option as meta key. [I verified the solution works with OSX Snow Leopard 10.6.8.] Solution obtained from here: http://iancwill.com/blog/?p=116

示例http://www.lawlist.com/images/option_as_meta.png

这篇关于os x上的自定义emacs键密钥绑定:DefaultKeyBinding.dict无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆