This page is a tutorial on switching buffers in emacs. If you don't know what buffers are, first see: Emacs: List Buffers.
switch-to-buffer 【Ctrl+x b】 to switch to a different buffer. Emacs will prompt you for a name, and you can press Tab ↹ for name completion.
A better command to switch buffer is
ido-switch-buffer will show a list of candidates AUTOMATICALLY as you type (no need to press Tab ↹ first).
ido-modeto turn it on.
ido-switch-buffer【Ctrl+x b】 to switch buffer.
When ido-mode is on, the key 【Ctrl+x b】 will call ido's version (
ido-switch-buffer is called, it will prompt for a choice of buffer name.
Here's the most useful ido hotkeys when in the prompt:
How to create a new file with ido-mode?
ido-switch-buffer, then press 【Ctrl+f】 to stop suggestion. This is useful when creating new file.
When you want to open a directory, you can press 【Ctrl+d】.
To make ido-mode default for switching buffer, put the following in your emacs init:
;; make buffer switch command auto suggestions, also for find-file command (ido-mode 1)
Ido can show suggestions vertically. This makes it easier to read.
Put the following in your emacs init file.
;; make ido display choices vertically (setq ido-separator "\n") ;; display any item that contains the chars you typed (setq ido-enable-flex-matching t)
See also: Emacs: Cycle Next/Previous User Buffers
Emacs: New Empty Buffer