Huhu
Huhu

Reputation: 121

vim:what's the difference between buffers and args

I'm using vim,when I see the :args command ,I don't know the difference between args and buffers. in vim,I know buffers is important, so I thought :arg* is not important,maybe it's a "legacy command", but when I play the vim genius game ,I see arg*

someone have any idea?

Upvotes: 9

Views: 3271

Answers (1)

gpullen
gpullen

Reputation: 1133

What is a Vim buffer?

A buffer is a file loaded into memory for editing. All opened files are associated with a buffer.

How do I identify a buffer?

Vim buffers are identified using a name and a number. The name of the buffer is the name of the file associated with that buffer. The buffer number is a unique sequential number assigned by Vim. This buffer number will not change in a single Vim session

The argument list is a subset of the buffer list. If you've just launched Vim, then the buffer list will be relatively empty.

Buffer List ==> files in vim buffers

Args List ==> files open at the dos/linux command line or open from the vim command line using :args (example open all c files in current directory :args *.c)

Here is a more detailed description and useful tips Buffer List v Argument List

Upvotes: 11

Related Questions