Skip to content

6.1. Buffer List And Argument List

shinokada edited this page Feb 28, 2014 · 2 revisions

Vim buffer FQA

Argument list

Argument list

Meet the arglist

If you give more than one file name when starting Vim, this list is remembered as the argument list. You can jump to each file in this list. You can think of the arglist as being a stable subset of the buffer list. The contents of the buffer list can change often, and sometimes without you realizing it. Whereas the arglist will only change its contents when you give an explicit instruction for it to do so.

# open more than one file.
$ vim a.txt b.txt
# args list. Active buffer with square brackets [a.txt] b.txt
:args
# close all files without warning
:qall

Traversing the arglist

Ex command     | unimpaired map    | effect
---------------|-------------------|-----------
:prev[ious]    | [a                |  reverse through argument list
:next          | ]a                |  advance through argument list
:first         | [A                |  go to start of arglist
:last          | ]A                |  go to end of arglist

Working with buffers

Working with buffers

Read my notes.

# open buffer list
:ls # or :buffers
# open a new buffer but does not affect the argument list
:e filename
# next buffer
:bn
# previous buffer
:bp
Clone this wiki locally