我使用的是 GNU Emacs 23.2.1
我的 init.el
(cua-mode 1)
(transient-mark-mode 1)
(setq shift-select-mode t)
(global-linum-mode 1)
(show-paren-mode 1)
(desktop-save-mode 1)
所以,我在 Shift => 上得到 2C,在 Shift <= 上得到 2D,而不是选择,等等。 如何解决?
附言
cat -v 换档 <=
^[[1;2D
cat -v 换档 =>
^[[1;2C
如何将这些键正确映射到左移、右移对应?
附言
对不起。我忘记了。我也在用屏幕。
den@playground:~/.emacs.den$ echo $TERM
screen
解决办法:
(define-key input-decode-map "\e[1;2D" [S-left])
(define-key input-decode-map "\e[1;2C" [S-right])
(define-key input-decode-map "\e[1;2B" [S-down])
(define-key input-decode-map "\e[1;2A" [S-up])
(define-key input-decode-map "\e[1;2F" [S-end])
(define-key input-decode-map "\e[1;2H" [S-home])
最佳答案
这意味着 emacs 和您的终端不同意各种 key 代码的含义。有更高级的方法来配置终端(终端特定的文件),但为了让您开始,请尝试在您的 emacs 初始化文件中添加类似这样的内容:
(define-key input-decode-map "\e[1;2D" [S-left])
(define-key input-decode-map "\e[1;2C" [S-right])
关于emacs - emacs中的Shift箭头选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11721224/