简体   繁体   English

如何让emacs快速打开新缓冲区?

[英]How can I get emacs to open a new buffer quickly?

I used to be able to open a new buffer in Emacs quickly using the command Cx b <non existent buffer name> 我曾经能够使用命令Cx b <non existent buffer name>快速在Emacs中打开一个新的缓冲区

Somehow I've broken this in my version of Emacs (23.1). 不知怎的,我在我的Emacs版本(23.1)中打破了这个。 When ever I try to do this now I get the message [No match] in the command buffer. 当我尝试这样做时,我在命令缓冲区中收到消息[No match]

Does anyone know what I might have done to break this functionality, or is it possible that I imagined being able to do this? 有谁知道我可能已经做了什么来打破这个功能,或者我有可能想到能够做到这一点?

Set confirm-nonexistent-file-or-buffer to nil : confirm-nonexistent-file-or-buffernil

confirm-nonexistent-file-or-buffer is a variable defined in `files.el'.
Its value is after-completion

Documentation:
Whether confirmation is requested before visiting a new file or buffer.
If nil, confirmation is not requested.
If the value is `after-completion', confirmation is only
 requested if the user called `minibuffer-complete' right before
 `minibuffer-complete-and-exit'.
Any other non-nil value means to request confirmation.

This affects commands like `switch-to-buffer' and `find-file'.

You can customize this variable.

This variable was introduced, or its default value was changed, in
version 23.1 of Emacs.

If you have enabled ido-mode , you can still switch to the behavior you're familiar with. 如果您启用了ido-mode ,您仍然可以切换到您熟悉的行为。 I do this frequently when I know I'll be creating a new named buffer. 当我知道我将创建一个新的命名缓冲区时,我经常这样做。

Cx b Cb Cx b Cb

You press Cj instead of hitting enter twice, which will bypass the confirmation and immediately open the new buffer. Cj而不是按两次输入,这将绕过确认并立即打开新缓冲区。 This works with or without ido-mode . 这可以使用或不使用ido-mode This will have the same effect has pressing enter with confirm-nonexistent-file-or-buffer set to nil . 如果将confirm-nonexistent-file-or-buffer设置为nil则按下enter键会产生相同的效果。

You probably enabled ido-mode . 你可能启用了ido-mode You need to press ENTER to confirm the creation of the buffer. 您需要按ENTER确认缓冲区的创建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM