emacs - 在 emacs 中按 Ctrl-Z 会卡住所有内容

标签 emacs

我正在使用 Linux,并在 emacs 和 sublime 文本之间切换。在崇高的文本中,Ctrl-Z 是撤消。这意味着有时我有时会在 emacs 中按 Ctrl-Z;不幸的是,当我这样做时,整个过程就会卡住。我认为这与暂停进程的典型 Ctrl-Z 行为有关;但是我在 GUI 中运行 Emacs,所以为什么它会有这种行为有点超出我的理解。有什么办法可以改变这个吗?

最佳答案

我会建议以下简单地完全禁用绑定(bind):

(global-unset-key (kbd "C-z"))

(global-set-key (kbd "C-z C-z") 'my-suspend-frame)

(defun my-suspend-frame ()
  "In a GUI environment, do nothing; otherwise `suspend-frame'."
  (interactive)
  (if (display-graphic-p)
      (message "suspend-frame disabled for graphical displays.")
    (suspend-frame)))

或者您可以直接将函数绑定(bind)到 C-z ,但我发现将其作为其他命令的前缀绑定(bind)打开它非常有用——考虑到我实际上很少需要调用 suspend-frame , 我找到一个双 C-z C-z一样方便。

关于emacs - 在 emacs 中按 Ctrl-Z 会卡住所有内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28202546/

相关文章:

ubuntu - 找不到构建 emacs 和 gnutls

emacs - 组织模式 : describe a chess position and automatically generate image of chessboard

emacs - 如何使用emacs将填充模式的默认宽度设置为80?

emacs - emacs 中的组织模式 : how to move all headline one level below

emacs - 无法将 emacs 作为守护进程运行

image - Emacs:是否可以浏览目录中的图像?在 Windows 上?

emacs - 命令取消注释多行而不选择它们

emacs - 如何替换 Emacs 中的单词?

c++ - 在新编译期间浏览以前的编译错误?

emacs - elisp:有没有办法获取当前 .el 模块的名称(如 C 中的 __FILE__)?