代码之家  ›  专栏  ›  技术社区  ›  chollida

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

  •  12
  • chollida  · 技术社区  · 14 年前

    我以前可以使用命令在emacs中快速打开一个新的缓冲区 C-x b <non existent buffer name>

    不知何故,我在Emacs(23.1)版本中打破了这一点。当我试着这么做的时候我得到了信息 [No match] 在命令缓冲区中。

    有没有人知道我可能做了什么来破坏这个功能,或者我有没有想过我能做到这一点?

    4 回复  |  直到 10 年前
        1
  •  9
  •   scottfrazer    14 年前

    集合 confirm-nonexistent-file-or-buffer nil :

    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.
    
        2
  •  7
  •   Derek Slager    14 年前

    如果您已启用 ido-mode ,仍然可以切换到熟悉的行为。当我知道要创建一个新的命名缓冲区时,我经常这样做。

    C-X 小精灵

        3
  •  3
  •   pheaver    14 年前

    你按下 C-J 而不是按enter两次,这将绕过确认并立即打开新的缓冲区。不管有没有 ido-mode . 这与按回车键的效果相同 confirm-nonexistent-file-or-buffer 设置为 nil .

        4
  •  2
  •   paprika    14 年前

    你可能启用了 ido-mode . 你得按一下 ENTER 以确认缓冲区的创建。