Emacs杀死缓冲区 [英] Emacs killing buffers

查看:161
本文介绍了Emacs杀死缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(Emacs newbie here)

(Emacs newbie here)

有时候,我的emacs编辑器中打开一个帮助缓冲区。它将在不同的窗格中打开,将当前窗口垂直分割成两半。

Sometimes a Help buffer gets opened in my emacs editor. It opens in a different pane, splitting the current window into two halves vertically.

当我使用Ck buffer-name时,要杀死一个缓冲区(说帮助),其他一些缓冲区(例如, scratch )将在该窗格中自动打开。

When I use C-k buffer-name, to kill a buffer (say Help), some other buffer (say scratch) gets opened automatically in that pane.

有可能在随机缓冲区(帮助)后还原到我以前的配置或Debug ..)被打开。

Is it possible to revert to my previous configuration, after a random buffer (Help or Debug..) gets opened.

我以前的配置将返回到没有窗格的单个窗口

My previous configuration would be to go back to a single window with no panes

推荐答案

要在任意更改后还原到以前的窗口配置,您应该在.emacs文件中启用获胜者模式

(winner-mode 1)

然后,您可以使用 Cc < left> (重复,如有必要)撤消窗口配置更改与 winner-undo

Then you can use C-c<left> (repeatedly, if necessary) to undo window configuration changes with winner-undo.

Cc < right> 致电 winner-redo 可以将您返回到最近的配置(立即;不像单个步骤那样像撤消命令)。

C-c<right> calls winner-redo which returns you to the most recent configuration (immediately; not in single steps the like the 'undo' command).

获胜模式是关键是永远不会因为Emacs造成不必要的窗口而烦恼,但它也让你做你以前不会做的事情(例如 Cx 1 以最大限度地最大限度地利用您的Windows窗口更容易的rea呃,因为回去所有你刚才删除的窗口现在是微不足道的)。

Winner mode is the key to never ever getting annoyed by Emacs creating an unwanted window, but it also lets you do things you wouldn't have done before (for instance C-x1 to maximise one of your windows temporarily for easier reading, because getting back all the windows you just deleted is now trivial).

显然这也是非常有用的,如果你不小心弄乱你的窗口配置!

Obviously this is also incredibly useful if you accidentally mess up your window config!

这篇关于Emacs杀死缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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