如何从Emacs的凌乱情况中恢复? [英] How to recover from messy situations in Emacs?

查看:152
本文介绍了如何从Emacs的凌乱情况中恢复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始在Emacs。有时我会尝试一些东西,当我完成实验,我想回到我正在编辑的缓冲区,但我不知道如何。更糟糕的是,有时我偶然碰到钥匙,甚至不知道我打了什么!在Vim中,我可以按ESC来恢复;有没有类似的方式在Emacs中恢复?



编辑:我正在使用命令行(非GUI)Emacs。

解决方案

还有ESC-ESC-ESC(键盘转义退出)。从手册中:


命令ESC ESC ESC
(keyboard-escape-quit)可以退出
或中止。这个键被定义是因为
ESC用于在许多PC
程序中退出。它可以取消前缀
参数,清除所选区域,或
从查询替换中删除,如C-g。
它可以离开minibuffer或
递归编辑,如C-]。它也可以
将框架分解成
多个窗口,如C-x 1.一个
它不能做的事情,但是,停止运行的
命令。这是
,因为它作为一个普通的
命令执行,Emacs没有注意到
,直到它准备好一个命令。


我发现按ESC是对退出情况的自然回应。当你沮丧时,多次冲击也可以令人感到满意。


I am just starting out in in Emacs. Sometimes I'll be experimenting with something and when I'm finished experimenting, I want to just go back to the buffer I was editing, but I don't know how. Worse, sometimes I hit a key by accident and don't even know what I hit! In Vim I can just hit ESC to recover; is there any similar way to recover in Emacs?

EDIT: I am using the command line (non-GUI) Emacs.

解决方案

There's also ESC-ESC-ESC (keyboard-escape-quit). From the manual:

The command ESC ESC ESC (keyboard-escape-quit) can either quit or abort. This key was defined because ESC is used to "get out" in many PC programs. It can cancel a prefix argument, clear a selected region, or get out of a Query Replace, like C-g. It can get out of the minibuffer or a recursive edit, like C-]. It can also get out of splitting the frame into multiple windows, like C-x 1. One thing it cannot do, however, is stop a command that is running. That's because it executes as an ordinary command, and Emacs doesn't notice it until it is ready for a command.

I find pressing ESC to be a natural response to the desire to "exit" a situation. Hammering it several times can also be emotionally satisfying when you are frustrated.

这篇关于如何从Emacs的凌乱情况中恢复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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