在emacs中解开emacs密钥多项目23 [英] Unbinding emacs keys for multi-term in emacs 23

查看:102
本文介绍了在emacs中解开emacs密钥多项目23的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 (setq term-unbind-key-列表'(CzCxCcChCy))

我看到的所有网站建议摆脱键绑定冲突都不起作用 - 我仍然无法使用手册页。
在emacs 23中有什么变化吗?如何正确解除绑定?

解决方案

变量 term-unbind-key-list 仅影响绑定在关键地图 term-raw-map 中。您可以通过查看函数 multi-term-keystroke-setup 的文档找到这一点(不知道为什么这些信息不可用于变量本身... )


term-char-mode的按键设置。



默认情况下, term-char-mode'的关键绑定与用户的
按键冲突。所以这个函数用
term-raw-map'来解除一些密钥,
用`term-raw-map'绑定一些按键。


所以...可能 Cz 仍然绑定到 suspend-frame b / c这就是Emacs默认情况下。



如果您希望 Cz 绑定到终端中的通常情况( suspend -job ),你可以这样做:

 (需要'多项'
(add-to-list'term-bind-key-alist'(Cz。term-stop-subjob))

这使得绑定做什么(我猜)你想要的。


I'm trying to setup multi-term for emacs 23, but the

(setq term-unbind-key-list '("C-z" "C-x" "C-c" "C-h" "C-y"))

line all the websites I've seen recommend for getting rid of key binding clashes doesn't work- I still can't C-z out of man pages for example. Did something change in emacs 23? How do I unbind them properly?

解决方案

The variable term-unbind-key-list only affects bindings in the key map term-raw-map. You can find this out by looking at the documentation for the function multi-term-keystroke-setup (no idea why this information isn't available for the variable itself...)

Keystroke setup of `term-char-mode'.

By default, the key bindings of term-char-mode' conflict with user's keystroke. So this function unbinds some keys withterm-raw-map', and binds some keystroke with `term-raw-map'.

So... likely the C-z is still bound to suspend-frame b/c that's what Emacs does by default.

If you want C-z to be bound to what it is normally in a terminal (suspend-job), you can do this:

(require 'multi-term)
(add-to-list 'term-bind-key-alist '("C-z" . term-stop-subjob))

Which makes the binding do what (I'm guessing) you want.

这篇关于在emacs中解开emacs密钥多项目23的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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