问题描述
我知道我可以使用C-x C +放大/缩小,但这只适用于当前文件。一旦我打开另一个,文本可以恢复到默认值,这真的是令人讨厌的做一遍又一遍。我如何保持当前emacs会话的缩放级别全局?我知道如果您知道确切的字体大小,可以在init文件中设置此缩放级别,别。此外,我不想让它永久 - 我通常需要这个,当我没有一个外部屏幕几个小时或连接到投标者,同时演示。
这段代码修改放大/缩小功能,将命令应用于每个缓冲区。这应该实现你想要做的。
(defadvice text-scale-increase(around all-buffers(arg)activate )
/ pre>
(dolist(buffer(buffer-list))
(with-current-buffer buffer
ad-do-it)))
I know that I can zoom in/out using C-x C-+, but this applies only to the current file. Once I open another one, the text goes back to the default value and it's really tiresome to do it over and over. How can I keep the zoom level global for the current emacs session?
I know it's possible to set this in the init file if you know the exact font size, which I don't. Plus, I don't want to keep it that permanent - I usually need this when I'm without an external screen for a couple of hours or connected to a beamer while giving a presentation.
解决方案This piece of code modify the zoom in/out functionality to apply the commands to every buffer. That should achieve what you are trying to do.
(defadvice text-scale-increase (around all-buffers (arg) activate) (dolist (buffer (buffer-list)) (with-current-buffer buffer ad-do-it)))
这篇关于emacs全球放大/缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!