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? I'm sorry for my poor English! thx!
A buffer is an area of Vim's memory used to hold text read from a file. In addition, an empty buffer with no associated file can be created to allow the entry of text. The :e filename command can edit an existing file or a new file.
Whenever you delete something from a file, vi keeps a copy in a temporary file called the general buffer. You can also delete or copy lines into temporary files called named buffers that will let you reuse those lines during your current vi work session.
Close buffer named Name (as shown by :ls ). Assuming the default backslash leader key, you can also press \bd to close (delete) the buffer in the current window (same as :Bclose ).
In a nutshell, by allowing hidden buffers with set hidden , you're telling Vim that you can have unsaved worked that's not displayed on your screen. You can see an example of this in the video below. That's Vim's way of saying you can't open a new buffer (and hide this one) without first writing it.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With