在终端中使用 emacs 时,某些键绑定不起作用 [英] Certain keybindings don't work when using emacs in a terminal

查看:19
本文介绍了在终端中使用 emacs 时,某些键绑定不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过在终端中输入 emacs 在它自己的窗口中加载 GNU emacs.我喜欢使用 pc-selection-mode 中的键绑定,它允许您使用 shift-right 或 shift-left 来突出显示字符,或者通过按 shift-up 或 shift-down 来突出显示整行.

I load GNU emacs in it's own window by typing emacs in the terminal. I like to use the keybindings from pc-selection-mode, which allows you to highlight characters using shift-right or shift-left, or entire lines by pressing shift-up or shift-down.

问题是,当我在终端中输入 emacs -nw 运行 emacs 时,后两个键绑定不起作用.我可以使用 shift-left 和 shift-right 突出显示字符,但按 shift-up 和 shift-down 没有任何作用.光标停留在原处.

The problem is that when I run emacs in the terminal by typing emacs -nw, the latter 2 keybindings don't work. I can highlight characters using shift-left and shift-right, but pressing shift-up and shift-down doesn't do anything. The cursor stays where it is.

我该如何解决这个问题?为什么会发生?我使用的是 GNU Emacs 23.1.1,并且我已经确认当 emacs 在它自己的窗口中和当 emacs 在终端内运行时使用相同的版本.

How do I fix this problem? Why is it even occurring? I'm using GNU Emacs 23.1.1, and I've confirmed that the same version is being used both when emacs is in it's own window and when emacs is running inside the terminal.

感谢您的帮助

推荐答案

很多时候没有列出绑定,或者映射错误.您可以尝试 M-x show-lossage(或 C-h l)来查看转义序列是否到达 emacs.如果他们这样做,您可能想尝试 xterm-extras - 即使我迁移它也总是有效在不同版本的 linux 和 solaris 之间,以及我在它们之间使用 ssh(这通常是问题的根源).

A lot of times the bindings just aren't listed, or are mapped wrong. You can try M-x show-lossage (or C-h l) to see if the escape sequences reach emacs or not. If they do, you might want to try xterm-extras -- it's always worked even as I migrate between different versions of linux and solaris, and as I ssh between them (which is often a source of problems).

这篇关于在终端中使用 emacs 时,某些键绑定不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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