Emacs创建了太多的缓冲区,比如启动时的这个:
Loading /home/david/.recentf...done
Cleaning up the recentf list...done (0 removed)
For information about GNU Emacs and the GNU system, type C-h C-a.当我想要自动补全时,还有一些像下面这样的:
Click <mouse-2> on a completion to select it.
In this buffer, type RET to select the completion near point.
Possible completions are:
perl-backward-to-noncomment perl-beginning-of-function
perl-electric-terminator perl-end-of-function
perl-indent-command perl-indent-exp
perl-mark-function perl-mode
perldb有没有一种方法可以让emacs删除自动补全缓冲区,而不是在一开始就创建它?谢谢。
发布于 2014-08-26 07:14:34
或者干脆完全禁用scratch、message和completions缓冲区,而不会破坏任何东西:
发布了第一个here,并粘贴了如下内容:
将此代码放入您的.emacs:
;; Makes *scratch* empty.
(setq initial-scratch-message "")
;; Removes *scratch* from buffer after the mode has been set.
(defun remove-scratch-buffer ()
(if (get-buffer "*scratch*")
(kill-buffer "*scratch*")))
(add-hook 'after-change-major-mode-hook 'remove-scratch-buffer)
;; Removes *messages* from the buffer.
(setq-default message-log-max nil)
(kill-buffer "*Messages*")
;; Removes *Completions* from buffer after you've opened a file.
(add-hook 'minibuffer-exit-hook
'(lambda ()
(let ((buffer "*Completions*"))
(and (get-buffer buffer)
(kill-buffer buffer)))))
;; Don't show *Buffer list* when opening multiple files at the same time.
(setq inhibit-startup-buffer-menu t)
;; Show only one active window when opening multiple files at the same time.
(add-hook 'window-setup-hook 'delete-other-windows)奖励:
;; No more typing the whole yes or no. Just y or n will do.
(fset 'yes-or-no-p 'y-or-n-p)发布于 2012-03-04 06:37:05
当我第一次开始使用emacs时,我有这种感觉。虽然我通常会在结束后关闭这样的“临时”缓冲区,但更普遍的答案是,您只需将它们抛在脑后,开发一个工作流程,这样您就可以到达您真正想要的缓冲区。否则,当它们不相关时,您将开始将自己的缓冲区视为杂乱,并浪费精力关闭它们。
iswitchb-mode是一个很好的开始。
发布于 2012-03-05 05:57:42
在emacs 24中有elisp函数:
清理缓冲区列表
这是由MidnightMode提供的,可以添加到其他版本中。
顾名思义,这也可以安排。
https://stackoverflow.com/questions/9549466
复制相似问题