Vim Recall繁體中文

List buffers

:ls

Example

Normal 0 / 3

Show the buffers Vim knows about.

Command output

Empty
Before & after

Before

Command output

Empty

After

Command output

1 %a   "alpha.txt"                    line 1
  2  h   "beta.txt"                     line 1
  3 #h   "gamma.txt"                    line 1

Start in Normal mode. Prepared terminal: 80 columns by 24 rows, cmdheight=1 and nomore. Submit the command with the first Enter; output waits at hit-enter. Press the second Enter to acknowledge and return to Normal mode.

Sample buffer
one two
three four
five six
keep
Cursor on line 1, column 1
Details & Vim help

Example replayed in Vim

Show the buffers Vim knows about.

Enter :ls and press Enter to list buffer numbers, names, and status flags. Buffers hold text; several windows can display one buffer.