我的问题是这样的:首先,我通过使用Mac上的Terminal.app通过ssh -Ylogin到远程服务器。 然后打开安装在远程服务器上的emacs
emacs
由于我在使用ssh时添加了-Y选项,因此在安装在Mac上的XQuartz中打开了emacs。
此时,问题出现了:选项键不被视为Meta,只有ESC键被视为Meta。 但是我想用选项键作为Meta。
我该如何解决?
.emacs位置可以用环境variables指定吗?
如何从emacs中实际更改/设置环境variables
如何为Windows和Linux电脑设置常见的emacs环境?
.cpp文件在编译后消失
在Windows上的emacs中使用“git add -p”的最佳方法是什么?
Magit不承认git仓库
如何使用Autohotkey将capslock密钥重新映射到EMACS super?
Windows的vi和emacs实现的行为是否像Unix对应?
我怎样才能在一个像emacs或Vim的编辑器在Linux中查看程序的控制台输出?
清晰的path是一个标准的path – '@@'和之后的string
看看http://www.emacswiki.org/emacs/MetaKeyProblems
具体这个部分。
然后,您可以使用选项/ alt键作为元键从X11窗口(Applications / Utilities / X11.app)运行emacs。 此外,可以使用xmodmap命令将命令键重新映射到仅在X11下的“控制”。 这具有允许命令键与其他Mac应用程序预期行为的优点。 xmodmap也可以确保Alt / Option键被设置为emacs中的Meta键。 你可以用下面的〜/ .xmodmap文件来做这件事(以感叹号开头的行是注释,可以省略):
! undo any Meta keys already set clear Mod1 ! keycodes 63 and 71 are the left and right COMMAND buttons adjacent to the spacebar; set them to be control keys keycode 63=Control_L keycode 71=Control_R ! keycodes 66 and 69 are the option/alt keys; assign them as Meta keys keycode 66=Meta_L keycode 69=Meta_R ! Now tell X11 that the Meta keys act as the Mod1 (Meta) modier key; that is,when they are pressed with KEY,it is the same as hitting M-KEY add Mod1 = Meta_L Meta_R ! tell X11 that the Control keys are Control modifiers,so when pressed with u (for example) it is the same as hitting Cu add Control = Control_L Control_R
使用上述文件与命令
xmodmap ~/.xmodmap
在启动emacs之前(例如,如果您使用xterm的登录shell选项,则从/ etc / bashrc启动,例如X11 / Application / Customize for terminal中的xterm -ls)。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。